Gem ::规范错误 - Rails 3

时间:2012-06-02 02:18:44

标签: ruby-on-rails-3

我有一个新的Rails安装,当我尝试运行控制台或任何rake任务时,我收到一条如下所示的错误消息:

$ rails c
[/.rvm/gems/ruby-1.9.2-p320/specifications/json_pure-1.7.0.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-1.4.29.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/launchy-2.0.5.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-serverside-adapter-1.6.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/escape-0.0.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/highline-1.6.11.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/net-ssh-2.2.2.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/json_pure-1.7.0.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-1.4.29.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/launchy-2.0.5.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-serverside-adapter-1.6.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/escape-0.0.4.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/highline-1.6.11.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/net-ssh-2.2.2.gemspec] isn't a Gem::Specification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/json_pure-1.7.0.gemspec] isn't a Gem::Specification (NilClss instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-1.4.29.gemspec] isn't a Gem::Specification (Nillass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/launchy-2.0.5.gemspec] isn't a Gem::Specification (NilClas instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/engineyard-serverside-adapter-1.6.4.gemspec] isn't a Gem::pecification (NilClass instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/escape-0.0.4.gemspec] isn't a Gem::Specification (NilClassinstead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/highline-1.6.11.gemspec] isn't a Gem::Specification (NilClss instead).
[/.rvm/gems/ruby-1.9.2-p320/specifications/net-ssh-2.2.2.gemspec] isn't a Gem::Specification (NilClas instead).
/.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/completion.rb:9:in `require': no such file to load --readline (LoadError)
        from /.rvm/rubies/ruby-1.9.2-p320/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (required)>'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands/console.rb:3:in `requie'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands/console.rb:3:in `<top required)>'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands.rb:20:in `require'
        from /.rvm/gems/ruby-1.9.2-p320/gems/railties-3.0.4/lib/rails/commands.rb:20:in `<top (requird)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

任何可能导致此问题的想法?

感谢。

1 个答案:

答案 0 :(得分:0)

我认为这是readline

/。rvm / rubies / ruby​​-1.9.2-p320 / lib / ruby​​ / 1.9.1 / irb / completion.rb:9:在`require'中:没有要加载的文件--readline(LoadError)< / p>

以下是一些资源:

https://rvm.io//packages/readline/

Problems with the rails console, RVM and readline

如果以上内容对您不起作用,那么您可以按照我的方式进行操作并使用此解决方案:

Rails3 and readline problem

在项目中包含rb-readline gem。 (我不确定这是否被视为黑客攻击)

https://github.com/luislavena/rb-readline

希望有所帮助。我花了一段时间才让控制台工作一次,而且有时令人沮丧。更不用说在更新一些Ubuntu软件包后我不得不再做一次。