部署 生产环境 rails s -e prodution 出错 (已经解决)

leslin123 · 2014年01月17日 · 最后由 aquarius0211_ 回复于 2014年12月08日 · 4638 次阅读
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 效果是不一样的!发帖供后来者参考一下。

感谢!!

thx~请问知道这二者有什么区别吗?

需要 登录 后方可回复, 如果你还没有账号请 注册新账号