2

when I'm trying to run rails console I get an error:

C:/ruby/Ruby193/lib/ruby/1.9.1/irb/completion.rb:9:in `require': cannot load suc
h file -- readline (LoadError)
        from C:/ruby/Ruby193/lib/ruby/1.9.1/irb/completion.rb:9:in `<top (requir
ed)>'
        from C:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/c
ommands/console.rb:3:in `require'
        from C:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/c
ommands/console.rb:3:in `<top (required)>'
        from C:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/c
ommands.rb:38:in `require'
        from C:/ruby/Ruby193/lib/ruby/gems/1.9.1/gems/railties-3.2.9/lib/rails/c
ommands.rb:38:in `<top (required)>'
        from script/rails:6:in `require'
        from script/rails:6:in `<main>'

I have installed readline from http://gnuwin32.sourceforge.net/packages/readline.htm but it didn't help me.

Any suggestions?

Lesha Pipiev
  • 3,251
  • 4
  • 31
  • 65
  • but I'm under Windows not Ubuntu. – Lesha Pipiev Feb 26 '13 at 17:08
  • Sorry I missed that bit, a lot of the readline solutions I'm seeing involve reinstalling ruby. Maybe try a fresh re-install using something like [RubyInstaller](http://rubyinstaller.org/). – Noz Feb 26 '13 at 17:28
  • It is not a duplicate. It seems that newer versions of RubyInstaller have such a problem with readline. I don't have found a solution for it. – Tsutomu Mar 17 '13 at 13:19

1 Answers1

3

readline is one of the external dependencies that the ruby stdlib depends on. The RubyInstaller distribution uses a pure-ruby implementation of readline in lieu of GNU-readline.

If you didn't initially install using RubyInstaller I would suggest reinstall using it. It handles all the external dependencies like that for you.

Azolo
  • 4,353
  • 1
  • 23
  • 31