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-dev
cd ext/readline
ruby extconf.rb
make
sudo 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.rb
checking for tgetnum() in -lncurses... no
checking for tgetnum() in -ltermcap... no
checking for tgetnum() in -lcurses... no
checking for readline/readline.h... no
checking for editline/readline.h... no

Leave a Comment