更新rubygems后Ruby on Rails错误:"无法找到宝石[]> = 0"

时间:2016-02-11 18:03:03

标签: ruby-on-rails ruby rubygems

我刚刚安装了Ruby on Rails,在尝试关注this tutorial时,我一直警告我要更新rubygems,然后运行.xml。我使用gem pristine --all进行了更新,并尝试运行sudo gem install rubygems-update,这导致了以下错误:

gem pristine --all

我还尝试在博客应用程序上运行ERROR: While executing gem ... (Gem::Exception) Failed to find gems [] >= 0 ,我收到以下错误:

bin/rails server

我也无法运行/usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError) from /usr/local/lib/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:55:in `require' from /home/mariana/Documents/RD-anagram/rails-test/blog/bin/spring:8:in `<top (required)>' from bin/rails:3:in `load' from bin/rails:3:in `<main>' ,因为我收到此错误:

rails --version

有谁知道如何解决这个问题?我做错了吗?

1 个答案:

答案 0 :(得分:3)

看起来你缺少了捆绑宝石。

做: -

gem install rails    
[sudo] gem install bundler
bundle install
gem install railties

如果上面的代码不起作用,你可以做一个 rvm implode重新安装rvm。请注意,该命令以递归方式删除所有rvm环境。