RoR Bundler问题

时间:2011-02-12 19:48:11

标签: ruby-on-rails ruby-on-rails-3 bundler

我从下往上安装了所有内容,并认为它运行良好,直到我运行bundle install

有没有人见过这个?有任何想法吗?请帮忙。感谢。

bundle install
Fetching source index for http://rubygems.org/
/usr/local/lib/ruby/1.9.1/rubygems/format.rb:38:in `from_file_by_path': Cannot load gem at [/usr/local/lib/ruby/gems/1.9.1/cache/rake-0.8.7.gem] in /home/ec2-user/anotherApp (Gem::Exception)
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/source.rb:73:in `fetch'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/installer.rb:45:in `block in run'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `block in each'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/spec_set.rb:12:in `each'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/installer.rb:44:in `run'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/installer.rb:8:in `install'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/cli.rb:226:in `install'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor.rb:246:in `dispatch'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/lib/bundler/vendor/thor/base.rb:389:in `start'
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.10/bin/bundle:13:in `<top (required)>'
    from /usr/local/bin/bundle:19:in `load'
    from /usr/local/bin/bundle:19:in `<main>'

2 个答案:

答案 0 :(得分:0)

不建议将Ruby 1.9.1与Rails一起使用。更好的1.8.7或1.9.2,请参阅http://rubyonrails.org/download。看起来你使用的是Debian / Ubuntu Ruby。 1.8.7在Debian / Ubuntu中可用并可用,通过apt安装ruby-full元数据包。或直接编译Ruby 1.9.2或通过Ruby版本管理器(rvm)编译。不要通过apt。

安装rubygems

答案 1 :(得分:0)

如果从源代码安装Ruby 1.9.2-x,它仍会将gem安装到/usr/local/lib/ruby/gems/1.9.1 / ...这有点像WTF({{3} })。我也遇到此错误,但也可能是由权限问题引起的。因此,请尝试以root身份再次运行该命令(假设您在* nix系统上遇到此问题)。是的,这并不理想,但是你可能会觉得它很有效,至少你可以继续着手解决问题(而且无论如何都在测试VM中,对吧?)。

相关问题