rails s -e prodution
=> Booting WEBrick
=> Rails 3.2.16 application starting in prodution on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
You did not specify how you would like Rails to report deprecation notices for your prodution environment, please set config.active_support.deprecation to :log, :notify or :stderr at config/environments/prodution.rb
Exiting
/usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.16/lib/active_record/connection_adapters/abstract/connection_specification.rb:47:in `resolve_hash_connection': database configuration does not specify adapter (ActiveRecord::AdapterNotSpecified)
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.16/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in `resolve_string_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.16/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in `spec'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.16/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in `establish_connection'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activerecord-3.2.16/lib/active_record/railtie.rb:88:in `block (2 levels) in <class:Railtie>'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/lazy_load_hooks.rb:36:in `instance_eval'
from /usr/local/rvm/gems/ruby-1.9.3-p484/gems/activesupport-3.2.16/lib/active_support/lazy_load_hooks.rb:36:in `execute_hook'
这个不行,换成 RAILS_ENV=production rails s 就可以了, 和 rails s –e production 效果是不一样的!发帖供后来者参考一下。