Home Notes Web development Rails 3 error: 'require': no such file to load -- readline (LoadError)

Rails 3 error: 'require': no such file to load -- readline (LoadError) E-mail
Monday, 07 February 2011 21:38

If you get an error like this trying to run rails console in a Rails 3 project:

`require': no such file to load -- readline (LoadError)

In Ubuntu you need to run the following (see here for other platforms):

sudo apt-get install libncurses5-dev libreadline5-dev

Then locate your current Ruby installation.  Mine, for example, is under /home/pranshu/.rvm/gems/ruby-1.9.2-p0 because I'm using RVM to manage multiple Ruby versions.

 

Run:

cd /home/pranshu/.rvm/gems/ruby-1.9.2-p0/ext/readline
ruby extconf.rb
make
make install

Next time you try running rails console it should run fine.



Tags: Ruby on Rails  Rails 3  Ruby  Linux  make  Ubuntu