1

I have a new Rails install, and when I try to run console or any rake task I get an error message that looks like this:

$ 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>'

Any ideas what might be causing this?

Thanks.

marcamillion
  • 32,933
  • 55
  • 189
  • 380

1 Answers1

0

I think it's readline

/.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)

Here's some resources:

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

Problems with the rails console, RVM and readline

If the above doesn't work for you then you can do what I did and use the solution here:

Rails3 and readline problem

which is to include the rb-readline gem in your project. (I'm not sure if this is considered a hack or not)

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

Hope that helps. It took me awhile to get the console working once and it was more than frustrating at times. Not to mention I had to do it again after updating some Ubuntu packages.

Community
  • 1
  • 1
Zhao Li
  • 4,936
  • 8
  • 33
  • 51