Adam Perfect

General

'no such file to load -- readline' error with Rails script/console

Having just hit this issue on my server where I'd recompiled Ruby from source, apparently on doing so you need to compile the readline library yourself as well.

There's a good how-to at dirk.net (it's really simple), but if like me you're using CentOS rather than some version of Debian, then rather than the 'sudo apt-get install libncurses5-dev', etc., you need the yum equivalent:

sudo yum install readline-devel

You won't (or at least I didn't) need the ilbncurses5-devel package equivalent. Once you've installed the readline developer package, you can follow the dirk.net instructions again and all should be well with the world and your console will work.

Written by Adam on

Adam is a Director of User Experience by day and photographer as time allows.

You may also like…