当我运行 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 <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="b7d4d4c5d8dad6c5f7ded9c4c3c5c2d4c3c2c5d299d4d8da" rel="noreferrer noopener nofollow">[email protected]</a>
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
我的配置文件-
rails: bundle exec rails server
webpack: ./node_modules/.bin/webpack-dev-server --config config/webpack.config.js
我错过了什么吗?
最佳答案
您可以尝试以下方法:
heroku 运行控制台
关于ruby-on-rails - Heroku 控制台无法启动 - 无法加载此类文件 --rack/handler/console,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43077898/