Welcome Guest | Login

Rails Console on VPS

Trying to run script/console on a VPS image returns:

Loading development environment (Rails 2.0.2)
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
       from /usr/local/lib/ruby/1.8/irb/completion.rb:10
       from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
       from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
       from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
       from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
       from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
       from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
       from /usr/local/bin/irb:13

Any ideas on how to get the console running?

2008-02-26 10:41 PM

A bit of googling came up with this:http://emmanueloga.wordpress.com/2007/11/29/ubuntu-gutsy-problem-number-two-ruby-scriptconsole-fails-to-start-readline/

Maybe it is an issue with the rails ready image

2008-02-26 10:44 PM

I've installed readline on your VPS account now. Please verify.

2008-02-27 12:22 AM

Looks good, thanks

2008-02-27 12:13 PM

Hi - I'm also trying to run script/console on our image and get:

Loading production environment (Rails 2.1.0)
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)
       from /usr/local/lib/ruby/1.8/irb/completion.rb:10
       from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `require'
       from /usr/local/lib/ruby/1.8/irb/init.rb:252:in `load_modules'
       from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `each'
       from /usr/local/lib/ruby/1.8/irb/init.rb:250:in `load_modules'
       from /usr/local/lib/ruby/1.8/irb/init.rb:21:in `setup'
       from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
       from /usr/local/bin/irb:13


Could you please help us get the console running?  Thanks!!!

2008-08-05 03:50 PM

Hi -If you’ve compiled Ruby from source, you might get this error when executing script/console.

One way of fixing this is to compile readline, which is distributed along with the Ruby source:

cd /opt/src/ruby-1.8.5-p2/ext/readline
ruby extconf.rb
make
make install

Also in some cases you may need to install readline.

yum install readline-devel

2008-08-05 04:07 PM

Regards,
Rahul
Hi Rahul - Thanks for the reply.  I didn't install Ruby from source.  Most of the fixes for this assume that was done.  Readline is already installed but it's v4.3 which I don't think is compatible with Ruby 1.8.6.  I did install readline-devel but it didn't help.  I was hoping Rails Hosting could install readline like they did for the person who had the original post.

Thanks!

Louis

2008-08-05 04:41 PM

Louis - I've installed readline on the server now. I've put ruby source directory under /root/source directory and compiled readline following the steps as Rahul mentioned earlier.

2008-08-05 05:11 PM

And slowly I've come to realize
it's all as it should be...
Can someone post the solution to this so it doesn't keep reoccuring.  Got the same issue.

2008-12-02 02:49 AM

Hi Lbau,

You can follow the steps mentioned by Rahul to compile readline and fix the issue. Once readline has been compiled the issue won't reoccur.

2008-12-02 04:25 AM

Using the ReadyForRails build image, the Ruby source isn't there.

But hey, i'll go get it.

2008-12-02 04:32 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!