Old Emmanuel Oga's Weblog (new one is at www.emmanueloga.com)

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

Posted in rails, ubuntu by emmanueloga on 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.

Tagged with: , , , ,

Una respuesta

Subscribe to comments with RSS.

  1. Henry said, on septiembre 27, 2009 at 10:30 pm

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


Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s

A %d blogueros les gusta esto: