2012-06-03 36 views
0

我在Rails的初学者,我已经按照ruby.railstutorials.org直到我坚持这一节http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec:1.4.1Heroku的键:添加错误

后,我安装的Heroku宝石由gem install heruku

我输入heroku keys:add然后我得到了这些错误。

/Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/resolver.rb:287:in `resolve': Could not find gem 'jquery-rails (= 2.0.0) ruby' in the gems available on this machine. (Bundler::GemNotFound) 
    from /Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/resolver.rb:161:in `start' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/resolver.rb:128:in `block in resolve' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `catch' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/resolver.rb:127:in `resolve' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/definition.rb:192:in `resolve' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/definition.rb:127:in `specs' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/bundler-1.1.4/lib/bundler/environment.rb:27:in `specs' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:41:in `candidate?' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:60:in `setup' 
    from /Users/xxx/.rvm/gems/[email protected]/gems/rubygems-bundler-1.0.2/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>' 
    from /Users/xxx/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require' 
    from /Users/xxx/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require' 
    from /Users/xxx/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require' 
    from /Users/xxx/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:9:in `<main>' 
abcs-MacBook-Pro-2:first_app xxx$ 

您能否让我知道如何解决它。

感谢

回答

0

尝试用正确的拼写再次安装宝石:

gem install heroku 

检查你使用的是带有

rvm list 
ruby -v 
gem list 

你需要切换到右侧的红宝石版本红宝石与

rvm use <ruby version> 

然后再安装heroku。

+0

对不起,我在上面的帖子mistyping。 我已经通过'gem install heroku'安装了heroku或者没有安装sudo,但是上面显示了错误。 – strc

+0

谢谢Anil 它已修复。 我输入'gem list'后 然后我把'gem'sqlite3','1.3.5'' 在gemfile中改成'gem'sqlite3','> = 1.3.5''并且也用于jquery-rails – strc

+0

你能接受答案吗? – Anil

0

获取Home Brew然后运行命令“brew doctor”。如果它告诉你,你有错误,修复这些错误。

我猜你是在Mac上,你可能会运行MacPorts。这有问题,因为MacPorts使用rvm尝试访问的较旧的库。您需要删除opt以及Brew酿生医生抱怨的路径中的一些内容。