Problems with the rails console, RVM and readline Problems with the rails console, RVM and readline ruby ruby

Problems with the rails console, RVM and readline


I had a similar problem it was with 1.9.2 on Ubuntu 10.04, but the symptoms were identical. In order to get it to work:

rvm pkg install readline

or prior to RVM version 1.6.32, you need the following command

rvm package install readline

Then:

apt-get install ncurses-dev

And then taking from their instructions at http://rvm.beginrescueend.com/packages/readline/

cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readlineruby extconf.rb -- --with-readline-dir="$HOME/.rvm/usr"make install

I had actually done a system rvm install on the server, so I needed to do this:

cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readlineruby extconf.rb -- --with-readline-dir="/usr/local/rvm/usr"make install

After that I was able to have full access to the console.


Run the command

rvm requirements

It shows the requirements and dependencies. Install those and reinstall the ruby on rvm

rvm remove 1.9.2rvm install 1.9.2

It works!


I got same problem and solved it.I check http://rvm.beginrescueend.com/packages/readline/ Please check follow 2 things:

  1. sudo aptitude install libreadline5-dev libncurses5-dev use libreadline6-dev, if you have a new version.
  2. ruby extconf.rb -- --with-readline-dir='/home/youruser/.rvm/usr/include/readline'make sure you have the readline lib files under the with-readline-dir you pointed.