The GNU Readline library is used with IRB [Interactive Ruby] to make the Rails breakpoint & console scripts support command history & method completion (more on breakpoints at HowtoDebugWithBreakpoint.)
You will see the following error when running “script/console” if you do not have the readline library installed:
$ script/console
Loading development environment.
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require’: no such file to load — readline (LoadError)
If you see this error, recovery is relatively straightforward. “readline” is a standard Ruby extension, but it might not have been compiled with your Ruby installation because you did not have the readline development headers installed at the time.
Using Readline with Ruby requires two things:
cd </code>/path/to/ruby_source<code>/ext/readline
ruby extconf.rb
make
make install </code> [do this as root/admin]
For Mac OS X users, a package installer of Ruby 1.8.2 that includes GNU Readline 5.0 is currently available from a gracious developer. (Be careful installing such a package over a pre-existing Ruby install; you might want to move any previous install out of the way.)