【问题标题】:Heroku could not find bundler errorHeroku 找不到捆绑程序错误
【发布时间】:2012-11-27 19:34:26
【问题描述】:

我有一个使用 Ruby 1.8.7-p352 的旧 Rails 2.3.8 应用程序,我一直在尝试迁移到 Heroku 的 cedar 堆栈。在开发中一切正常,部署也很顺利,但是当我尝试访问该站点时,我收到了 App Crashed 错误。

2012-11-27T19:16:08+00:00 heroku[web.1]: Starting process with command `bundle exec thin start -p 58772 -e production`
2012-11-27T19:16:09+00:00 app[web.1]:   from /app/vendor/ruby-1.8.7/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:256:in `to_spec'
2012-11-27T19:16:09+00:00 app[web.1]:   from /app/vendor/ruby-1.8.7/lib/ruby/site_ruby/1.8/rubygems.rb:1231:in `gem'
2012-11-27T19:16:09+00:00 app[web.1]: /app/vendor/ruby-1.8.7/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:247:in `to_specs': Could not find bundler (>= 0) amongst [] (Gem::LoadError)
2012-11-27T19:16:09+00:00 app[web.1]:   from /app/vendor/bundle/1.8/bin/bundle:22
2012-11-27T19:16:10+00:00 heroku[web.1]: Process exited with status 1
2012-11-27T19:16:10+00:00 heroku[web.1]: State changed from starting to crashed

这是因为不再支持 1.8.7,还是有修复?

编辑:添加我的 gemfile 以响应评论。

source :gemcutter

ruby "1.8.7"
gem "rails",   "2.3.8"
gem "bundler", "1.2.2"
gem "thin"
gem "pg"

【问题讨论】:

    标签: ruby-on-rails ruby bundler ruby-1.8.7


    【解决方案1】:

    查看您的配置变量是否针对 ruby​​ 1.8.7 进行了更新:

    https://devcenter.heroku.com/articles/changing-ruby-version-breaks-path

    【讨论】:

    • 这修复了它。感谢 Heroku 的支持!
    【解决方案2】:

    It should work on cedar.

    您是否在 Gemfile 中指定了 ruby​​ 版本?

    source "https://rubygems.org"
    ruby "1.8.7"
    # ...
    

    More info about this on the Heroku docs

    【讨论】:

    • 是的(在我这样做之前我有一组不同的错误)。我会将我的 gemfile 添加到问题中。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多