# Rails3 rails console throws error

**URL:** <https://www.ruby-forum.com/t/rails3-rails-console-throws-error/190949>\
**Category:** Rails\
**Created:** [July 1, 2010, 2:04pm UTC](https://www.ruby-forum.com/t/rails3-rails-console-throws-error/190949 "2010-07-01T14:04:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![zufar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5f8ce5/32.png) [@zufar](https://www.ruby-forum.com/u/zufar)\
**Post date:** [July 1, 2010, 2:04pm UTC](https://www.ruby-forum.com/t/rails3-rails-console-throws-error/190949/1 "2010-07-01T14:04:50Z")

</div>

Hi,

I am trying Rails 3 and I am using RVM to manage the ruby versions.

Using RVM I had installed ruby versions 1.8.7, 1.9.1 and 1.9.2

When I do “rails console” I am getting the following error and console  
isn’t starting: [http://www.pastie.org/1026503](http://www.pastie.org/1026503)

Since I dont require 1.9.1 any more to work with Rails 3, I un-installed  
it using the following command:

rvm uninstall ruby-1.9.1

Then also, the console isn’t working. Please help.

---

<div class="post-metadata">

**Author:** ![zufar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5f8ce5/32.png) [@zufar](https://www.ruby-forum.com/u/zufar)\
**Post date:** [July 1, 2010, 2:30pm UTC](https://www.ruby-forum.com/t/rails3-rails-console-throws-error/190949/2 "2010-07-01T14:30:30Z")

</div>

This error means you did not have the required dependencies to install  
readline during installation of ruby. If you can find the location of  
the ruby source files in your system, you can go to the ext/readline  
folder. In there there should be an extconf.rb which you can run with

ruby extconf.rb

This will fail but it will tell you what dependencies is missing. You  
would have to install those first. I don’t know what OS you are using  
but when I had this error in CentOS I had to install a few packages from  
yum before I could run extconf.rb successfully. After this it will  
generate a make file which is just like installing any other package  
from source.

---

<div class="post-metadata">

**Author:** ![zufar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/z/5f8ce5/32.png) [@zufar](https://www.ruby-forum.com/u/zufar)\
**Post date:** [July 1, 2010, 4:18pm UTC](https://www.ruby-forum.com/t/rails3-rails-console-throws-error/190949/3 "2010-07-01T16:18:52Z")

</div>

Kenneth Â Â Â wrote:

> This error means you did not have the required dependencies to install  
> readline during installation of ruby. If you can find the location of  
> the ruby source files in your system, you can go to the ext/readline  
> folder. In there there should be an extconf.rb which you can run with
> 
> ruby extconf.rb
> 
> This will fail but it will tell you what dependencies is missing. You  
> would have to install those first. I don’t know what OS you are using  
> but when I had this error in CentOS I had to install a few packages from  
> yum before I could run extconf.rb successfully. After this it will  
> generate a make file which is just like installing any other package  
> from source.

Kenneth,

Thanks for the reply. I am using Ubuntu 10.04 and RVM to manage  
different ruby installations.

I had to do:

rvm package install readline  
rvm remove 1.9.2  
rvm install 1.9.2 -C --with-readline-dir=/home/syed/.rvm/usr/

following the instructions here:  
[http://rvm.beginrescueend.com/packages/readline/](http://rvm.beginrescueend.com/packages/readline/) and with help from  
Sutto at #rvm [irc.freenode.net](http://irc.freenode.net)

I didn’t try your solution, though I am sure it works.

Thanks once again.
