当我运行 heroku run bundle install 时出现错误
/usr/lib/ruby/1.9.1/rubygems.rb:308:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)
from /app/bin/bundle:3:in `<main>'
当我在 heroku run rails console
时出现错误
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- bundler (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from /app/bin/spring:8:in `<top (required)>'
from /app/bin/rails:3:in `load'
from /app/bin/rails:3:in `<main>'
我做什么?
我在其中添加了 nodejs buildpack
最佳答案
我最近也有过类似的经历
/usr/lib/ruby/1.9.1/rubygems.rb:308:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)
但通过使用 Node
和 Ruby
buildpacks 解决了。
检查您当前的构建包
heroku buildpacks
在 Node
之后添加 Ruby
构建包
heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-ruby
关于ruby-on-rails - 在 heroku 上找不到 gem bundler (>= 0) (Gem::GemNotFoundException),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36601685/