Ubuntu gutsy problem number two: ruby script/console fails to start (readline)
Just for the record, number problem one was to set up mongrel_cluster on init.d.
Soooo. Now “ruby script/console” fails with a “require ‘readline’ failure” or something. The problem was that, for some reason, when i built the ruby interpreter (1.8.6) the readline extension was not built and installed. ruby’s readline extension comes with the standard ruby distribution. So, i did a:
- “locate readline” (probably you will need a “sudo updatedb” before, or better just look for the source code of your ruby interpreter where you know it is. You know that, right? 🙂
- Went to the directory where your ruby source code lives, subdirectory ext/readline. In my case: “cd ~/packages/ruby-1.8.6-p110/ext/readline“
- “ruby extconf.rb” –this one generates the makefile for the library
- “sudo make install“.
In ubuntu you’ll problably need libreadline5 and libreadline5-dev _before_ running make:
“sudo apt-get install libreadline5 and libreadline5-dev”
Now “ruby script/console” should work.