Heroku控制台无法启动 - 无法加载此类文件 - 机架/处理程序/控制台

时间:2017-03-28 19:05:41

标签: ruby-on-rails ruby ruby-on-rails-4 heroku

当我运行heroku run rails console时,我的堆栈跟踪显示为:

Running rails console on ⬢ canvas-gattaca... up, run.8126 (Standard-1X)
Exiting
/app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- rack/handler/console (LoadError)
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:274:in `block in require'
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:240:in `load_dependency'
    from /app/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.5.2/lib/active_support/dependencies.rb:274:in `require'
    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/handler.rb:90:in `try_require'
    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/handler.rb:16:in `get'
    from /app/vendor/bundle/ruby/2.2.0/gems/rack-1.6.5/lib/rack/server.rb:290:in `server'
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/server.rb:125:in `print_boot_information'
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/server.rb:75:in `start'
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:80:in `block in server'
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in `tap'
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:75:in `server'
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
    from /app/vendor/bundle/ruby/2.2.0/gems/railties-4.2.5.2/lib/rails/commands.rb:17:in `<top (required)>'
    from bin/rails:9:in `require'
    from bin/rails:9:in `<main>'

我的日志是:

2017-03-28T19:02:33.583671+00:00 app[api]: Starting process with command `bundle exec rails server console` by user ccromar@instructure.com
2017-03-28T19:02:37.784210+00:00 heroku[run.4264]: Awaiting client
2017-03-28T19:02:37.827306+00:00 heroku[run.4264]: Starting process with command `bundle exec rails server console`
2017-03-28T19:02:38.058988+00:00 heroku[run.4264]: State changed from starting to up
2017-03-28T19:02:45.391746+00:00 heroku[run.4264]: State changed from up to complete
2017-03-28T19:02:45.377045+00:00 heroku[run.4264]: Process exited with status 1

我的Procfile -

rails: bundle exec rails server
webpack: ./node_modules/.bin/webpack-dev-server --config config/webpack.config.js

我错过了什么吗?

1 个答案:

答案 0 :(得分:4)

您可以尝试这种方式:

heroku run console