2

请帮忙,我正在尝试通过 ubuntu 12.04 上的终端将 rails 应用程序部署到 heroku。我试过了,

$ heroku login

并收到以下消息

/home/laolu/.rvm/gems/ruby-2.0.0-p247@global/gems/rubygems-bundler-    1.2.2/lib/rubygems_plugin.rb:23:in `require': cannot load such file -- rubygems-bundler/wrapper (LoadError)
from /home/laolu/.rvm/gems/ruby-2.0.0-p247@global/gems/rubygems-bundler-1.2.2/lib/rubygems_plugin.rb:23:in `<top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1113:in `load'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1113:in `block in <top (required)>'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1105:in `each'
from /usr/local/lib/site_ruby/1.9.1/rubygems.rb:1105:in `<top (required)>'
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'

我不确定它是否有用,但这也是我的 gemfile

source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0

gem 'rails', '4.0.0'

group :development do
  gem 'sqlite3', '1.3.7'
end

gem 'sass-rails', '4.0.0'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.0'
gem 'jquery-rails', '2.2.1'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'pg', '0.15.1'
  gem 'rails_12factor', '0.0.2'
end

谢谢

4

2 回答 2

0

如果文件是只读的,您可以使用以下代码保存:

:w !sudo tee % > /dev/null
于 2013-10-03T04:22:18.240 回答
0

我也遇到了同样的问题并且能够解决它。

  1. 打开你的终端并输入:

    哪个heroku

你应该得到类似的东西:/usr/local/heroku/bin/heroku

  1. 输入“sudo gedit /usr/local/heroku/bin/heroku”

  2. 在文件的顶部,您应该会看到类似于以下内容的行:

    “#!/usr/bin/env ruby​​1.9.3”

  3. 改成:

    “#!/usr/bin/env 红宝石”

  4. 节省

  5. 在终端“heroku login”中重新输入,你应该很高兴:)

于 2013-08-25T17:23:36.470 回答