【问题标题】:"bundler: command not found: unicorn" after adding Procfile as told by Heroku Bamboo to Cedar migration guide按照 Heroku Bamboo 向 Cedar 迁移指南添加 Procfile 后的“捆绑程序:找不到命令:独角兽”
【发布时间】:2014-07-17 04:19:26
【问题描述】:

按照 Bamboo 到 Cedar 迁移指南的说明,我将此 Procfile 添加到我的 Heroku 应用程序中:

web: bundle exec unicorn -p $PORT -E $RACK_ENV -c config/unicorn.rb
worker: bundle exec rake jobs:work

然后我跑bundle install 并推动。现在服务器不再启动:

heroku[web.1]: State changed from up to starting
app[web.1]:     /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `block in start'
app[web.1]:     /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands/server.rb:65:in `start'
app[web.1]:     /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:32:in `start'
app[web.1]:     /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:160:in `start'
app[web.1]:     /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/server.rb:217:in `start'
app[web.1]: [2014-07-17 04:02:16] FATAL SignalException: SIGTERM
app[web.1]:     /app/vendor/ruby-2.0.0/lib/ruby/2.0.0/webrick/server.rb:170:in `select'
app[web.1]:     /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:30:in `block in <top (required)>'
app[web.1]: [2014-07-17 04:02:16] INFO  WEBrick::HTTPServer#start done.
app[web.1]:     /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:27:in `tap'
app[web.1]: [2014-07-17 04:02:16] INFO  going to shutdown ...
app[web.1]: Exiting
app[web.1]:     /app/vendor/bundle/ruby/2.0.0/gems/rack-1.2.8/lib/rack/handler/webrick.rb:13:in `run'
app[web.1]:     script/rails:6:in `require'
app[web.1]:     /app/vendor/bundle/ruby/2.0.0/gems/railties-3.0.19/lib/rails/commands.rb:27:in `<top (required)>'
app[web.1]:     script/rails:6:in `<main>'
app[web.1]: bundler: command not found: unicorn
app[web.1]: Install missing gem executables with `bundle install`

我做错了什么?

【问题讨论】:

  • 在运行bundle install 后,您是否将独角兽添加到您的 Gemfile 并提交 Gemfile 和 Gemfile.lock?

标签: ruby-on-rails heroku unicorn cedar procfile


【解决方案1】:

gem 'unicorn' 添加到您的Gemfile,运行bundle install。提交更新的 Gemfile 和 Gemfile.lock 文件并将其推送到 Heroku。

【讨论】:

    猜你喜欢
    • 2018-01-19
    • 2023-03-18
    • 2011-10-20
    • 2023-03-29
    • 1970-01-01
    • 1970-01-01
    • 2013-07-03
    • 2015-07-01
    • 2018-11-10
    相关资源
    最近更新 更多