错误1:ActiveRecord::StatementInvalid /home/diudiugirl/.rvm/gems/ruby-2.1.3/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:243:in `query’: Mysql2::Error: Table ‘ashelf_development.accounts’ doesn’t exist: SHOW FULL FIELDS FROM `accounts` (ActiveRecord::StatementInvalid) ….. 解决方法: database.yml中配置了三种环境,使用不同的数据库:development、test和production,而默认的是development环境。而在上述错误中未指定production环境,让我们使用rails s -e prodution来指定,又出现了如下的错误2。 错误2:ActiveRecord::AdapterNotSpecified /home/diudiugirl/.rvm/gems/ruby-2.1.3/gems/activerecord-3.2.12/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection’: database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified) 解决方法:使用 RAILS_ENV=production rails s 命令来指定。 错误3:Errno::EADDRINUSE /home/diudiugirl/.rvm/rubies/ruby-2.1.3/lib/ruby/2.1.0/socket.rb:206:in `bind’: Address already in use – bind(2) for 0.0.0.0:3000 (Errno::EADDRINUSE) 解决方法:已经有一个rails s在运行了。 错误4:ExecJS::RuntimeUnavailable /home/diudiugirl/.rvm/gems/ruby-2.1.3/gems/execjs-2.2.2/lib/execjs/runtimes.rb:51:in `autodetect’: Could not find […]
rials server error
- Post author By Sophia
- Post date
- Categories In learning, 索菲亚一世
- No Comments on rials server error