Saturday, January 28, 2012

Rails to_sentence method

https://github.com/rails/rails/blob/274c3fad5087306a64ca91d044756221f5ff862c/activesupport/lib/active_support/core_ext/array/conversions.rb#L11

no such file to load - readline

When trying to run 'rails c' I got the error below when I installed Ubuntu 11.10:

$ ... no such file to load - readline ...

running the ff. code:
ruby extconf.rb


results to:

$ checking for tgetnum() in -lncurses... yes
$ checking for readline/readline.h... yes
$ checking for readline/history.h... yes
$ checking for readline() in -lreadline... no
$ checking for readline() in -ledit... no
$ checking for editline/readline.h... no


This will fix the readline error:


$ sudo apt-get install libreadline6 libreadline6-dev

$ rvm pkg uninstall readline
$ cd ~/.rvm/src/ruby-1.9.2-p290/ext/readline
$ ruby extconf.rb --with-editline-dir=/usr/ --with-readline-dir=/usr/
$ make
$ make install