生产服务器无法正常工作:Rails 5.0.0上的Ruby 2.3.0

时间:2017-09-14 20:32:22

标签: ruby-on-rails ruby heroku

我正在完成"基本Web开发人员课程(免费)"在http://upskillcourses.com并遇到了一个我无法解决的问题。

我的工作可以在这个github.com链接找到:

https://github.com/josua111/upskill_saas_tutorial

我的问题:

在开发者模式下运行服务器一直在运行,但是当我将它发送到heroku时,它将无法正常工作。我尝试使用以下方法在cloud9中以生产模式运行它:

$ rails server -e production

它不起作用并从终端获得以下反馈:

=> Booting Puma
=> Rails 5.0.0 application starting in production on http://0.0.0.0:8080
=> Run `rails server -h` for more startup options
Exiting
/usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/actionpack-5.0.0/lib/action_controller/railtie.rb:59:in `block (3 levels) in <class:Railtie>': Invalid option key: raise_on_unfiltered_parameters= (RuntimeError)
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/actionpack-5.0.0/lib/action_controller/railtie.rb:54:in `each'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/actionpack-5.0.0/lib/action_controller/railtie.rb:54:in `block (2 levels) in <class:Railtie>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `instance_eval'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:38:in `execute_hook'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:45:in `block in run_load_hooks'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `each'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/lazy_load_hooks.rb:44:in `run_load_hooks'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/actionpack-5.0.0/lib/action_controller/base.rb:263:in `<class:Base>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/actionpack-5.0.0/lib/action_controller/base.rb:164:in `<module:ActionController>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/actionpack-5.0.0/lib/action_controller/base.rb:5:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'
        from /home/ubuntu/workspace/saasapp/app/controllers/application_controller.rb:1:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `block in require'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:259:in `load_dependency'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:293:in `require'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:380:in `block in require_or_load'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:37:in `block in load_interlock'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/concurrency/share_lock.rb:117:in `exclusive'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies/interlock.rb:11:in `loading'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:37:in `load_interlock'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:358:in `require_or_load'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:336:in `depend_on'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/activesupport-5.0.0/lib/active_support/dependencies.rb:252:in `require_dependency'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/engine.rb:476:in `block (2 levels) in eager_load!'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/engine.rb:475:in `each'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/engine.rb:475:in `block in eager_load!'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/engine.rb:473:in `each'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/engine.rb:473:in `eager_load!'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/engine.rb:354:in `eager_load!'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/application/finisher.rb:59:in `each'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/application/finisher.rb:59:in `block in <module:Finisher>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/initializable.rb:30:in `instance_exec'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/initializable.rb:30:in `run'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `call'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
        from /usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/initializable.rb:54:in `run_initializers'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/application.rb:352:in `initialize!'
        from /home/ubuntu/workspace/saasapp/config/environment.rb:5:in `<top (required)>'
        from /home/ubuntu/workspace/saasapp/config.ru:3:in `require_relative'
        from /home/ubuntu/workspace/saasapp/config.ru:3:in `block in <main>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/builder.rb:55:in `instance_eval'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/builder.rb:55:in `initialize'
        from /home/ubuntu/workspace/saasapp/config.ru:in `new'
        from /home/ubuntu/workspace/saasapp/config.ru:in `<main>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/builder.rb:49:in `eval'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/builder.rb:49:in `new_from_string'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/builder.rb:40:in `parse_file'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/server.rb:319:in `build_app_and_options_from_config'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/server.rb:219:in `app'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/commands/server.rb:59:in `app'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/server.rb:354:in `wrapped_app'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/rack-2.0.3/lib/rack/server.rb:283:in `start'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/commands/server.rb:79:in `start'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:90:in `block in server'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
        from /home/ubuntu/workspace/saasapp/bin/rails:9:in `require'
        from /home/ubuntu/workspace/saasapp/bin/rails:9:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `load'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/spring-1.7.2/lib/spring/client/rails.rb:28:in `call'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/spring-1.7.2/lib/spring/client/command.rb:7:in `call'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/spring-1.7.2/lib/spring/client.rb:30:in `run'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/spring-1.7.2/bin/spring:49:in `<top (required)>'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `load'
        from /usr/local/rvm/gems/ruby-2.3.0@saasapp/gems/spring-1.7.2/lib/spring/binstub.rb:11:in `<top (required)>'
        from /home/ubuntu/workspace/saasapp/bin/spring:15:in `require'
        from /home/ubuntu/workspace/saasapp/bin/spring:15:in `<top (required)>'
        from bin/rails:3:in `load'
        from bin/rails:3:in `<main>'

Heroku的应用程序日志显示以下内容:

2017-09-14T20:07:32.907315+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:90:in `block in server'
2017-09-14T20:07:32.907330+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `tap'
2017-09-14T20:07:32.907331+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:85:in `server'
2017-09-14T20:07:32.907332+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
2017-09-14T20:07:32.907333+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.3.0/gems/railties-5.0.0/lib/rails/commands.rb:18:in `<top (required)>'
2017-09-14T20:07:32.907347+00:00 app[web.1]:    from bin/rails:9:in `require'
2017-09-14T20:07:32.907347+00:00 app[web.1]:    from bin/rails:9:in `<main>'
2017-09-14T20:07:33.082126+00:00 heroku[web.1]: State changed from starting to crashed
2017-09-14T20:07:33.067518+00:00 heroku[web.1]: Process exited with status 1
2017-09-14T20:08:49.126236+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=rocky-atoll-96914.herokuapp.com request_id=4e1037eb-4003-4b6a-ad8b-77bca1690294 fwd="70.89.11.49" dyno= connect= service= status=503 bytes= protocol=https
2017-09-14T20:08:49.633665+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=rocky-atoll-96914.herokuapp.com request_id=f3d2b017-0a7a-4248-8843-804eae6b4a83 fwd="70.89.11.49" dyno= connect= service= status=503 bytes= protocol=https

google没有进展。我有很多学习要做。我不太确定从哪些日志开始。

感谢任何帮助。

感谢。

0 个答案:

没有答案