无法在heroku上找到gem bundler(> = 0)(Gem :: GemNotFoundException)

时间:2016-04-13 14:34:06

标签: ruby-on-rails ruby heroku buildpack

当我运行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

1 个答案:

答案 0 :(得分:2)

我最近有类似的经历

  

/usr/lib/ruby/1.9.1/rubygems.rb:308:in`bin_path':找不到宝石   bundler(&gt; = 0)(Gem :: GemNotFoundException)

但是使用NodeRuby buildpacks解决了这个问题。

检查您当前的构建包

heroku buildpacks

Ruby

之后添加Node buildpack
heroku buildpacks:add --index 2 https://github.com/heroku/heroku-buildpack-ruby