Emmanuel Oga’s Weblog

Ubuntu gutsy problem number two: ruby script/console fails to start (readline)

Posteado por: emmanueloga en: Noviembre 29, 2007

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
  • make
  • 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.

Etiquetas: , , , ,

1 Respuesta para "Ubuntu gutsy problem number two: ruby script/console fails to start (readline)"

Hi, thanks for posting this. I had the problem with a new source install with ruby 1.8.7 patchlevel 72.

Escribe un comentario

About Me


Professional Software developer, amateur musician. Obsessed with finding the best algorithms for solving the problems nobody has.

My Profile

View Gustavo Emmanuel Oga's profile on LinkedIn

Recomendame

Recommend Me

Stats

  • 21,525 hits

Twitter

LocosXRails Conference