ruby-on-rails - 在 heroku 上找不到 gem bundler (>= 0) (Gem::GemNotFoundException)

标签 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

最佳答案

我最近也有过类似的经历

/usr/lib/ruby/1.9.1/rubygems.rb:308:in `bin_path': can't find gem bundler (>= 0) (Gem::GemNotFoundException)

但通过使用 NodeRuby 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/

相关文章:

ruby - 使用 RVM 安装 Ruby 时出现问题

ruby-on-rails - rails : Conditional redirect in rails app controller

ruby-on-rails - Rspec:在辅助测试中设置 cookie

ruby - 了解 Ruby 中的作用域

heroku - 使用带有react-rails gem的组件时没有这样的文件或目录@ rb_sysopen

java - 如何在heroku中部署spring boot应用程序jar

ruby-on-rails - 将 Sqlite3 更改为 Postgresql Rails

android - 使用 rpush gem 在 Ruby on Rails 4 服务器上实现 Android GCM?

ruby-on-rails - Rubygems 的 SSL 错误(无法连接)

Ruby 内部机制以及如何保证哈希值的唯一性