Ruby 1.9.2 and Rails 3 cannot open rails console
Apparently ubuntu and ruby don't always catch dependencies like they should.
From the first google hit (yeah, I clicked on this stack-overflow in place #2 before checking out the first result.)
Navigate to the Ruby source and enter:
sudo apt-get install libreadline5-devcd ext/readlineruby extconf.rbmakesudo make install
So, if you're on another distro, make sure you install readline somehow (source/package), then run make/install on extconf from the source. I tried what gkaykck suggested of course but got this without readline already on my system.
$ ruby extconf.rbchecking for tgetnum() in -lncurses... nochecking for tgetnum() in -ltermcap... nochecking for tgetnum() in -lcurses... nochecking for readline/readline.h... nochecking for editline/readline.h... no
Recipe for those who use rvm:
rvm pkg install readlinervm remove 1.9.3rvm install 1.9.3 --with-readline-dir=$rvm_path/usr
In more details about it on https://rvm.io/packages/readline/
If you want another solution to this problem do this.
sudo apt-get install libreadline6
Then in your gem file add:
gem 'rb-readline'
Then
bundle install
And you should be all set.