Readline not working in rvm - Ubuntu 11.10
I got the solution:
Run the command
rvm requirements
It shows the requirements and dependencies. Install those and reinstall the ruby on rvm
rvm remove 1.9.2
rvm install 1.9.2
It works!
How to get Readline support in IRB using RVM on Ubuntu 11.10
Ok, so this might seem pretty obvious, well it always is when you know the answer:
I gave up using RVM, and switched to rbenv - which I'm very pleased I did!
sudo apt-get install libreadline-gplv2-dev
CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline --with-openssl-dir=/usr/local" rbenv-install 1.9.2-p290
This installed without error - and I'm still not convinced I need the gplv2 package as I've got libreadline6-dev installed. However that STILL didn't resolve my problem. It did remove RVM from the equation, and show me that despite my best efforts the IRB shell was refusing to use readline.
The answer came from reading through this great guide:
RubyTools.pdf
Inside my ~/.irbrc file I found:
IRB.conf[:USE_READLINE] = false
A quick update to:
IRB.conf[:USE_READLINE] = true
And I'm cooking on gas!!
Thanks for all the great answers and suggestion, I do appreciate your time.
rvm install ree complaining about readline on Ubuntu
I finally got it working by running this line:
rvm install ree --with-readline-dir=$rvm_path/usr --with-iconv-dir=$rvm_path/usr --with-zlib-dir=$rvm_path/usr --with-openssl-dir=$rvm_path/usr
Running only rvm install ree --with-readline-dir=$rvm_path/usr
didn't work, so maybe they all need to be run at the same time.
Note that I ran the following commands some time before succeeding:
rvm head update; rvm reload;
# remove any file from previous failed installations
rvm remove ree
# as suggested in a comment on the question
sudo apt-get install libreadline6-dev
I'm not sure if the libreadline6-dev
was necessary, but maybe and it's worth a try if you're having trouble.
ubuntu 11.10 readline error
You seem to be missing the readline
lib. I don't have a linux install close by, but something like sudo apt-get install libreadline
should solve your problem. Maybe I got the name of the package wrong, don't hesitate to make a quick search
EDIT : what about rvm pkg install readline
?
can't get rails console to work on ubuntu 11.10
Ubuntu 11.10 uses newer readline library which not in sync with the readline package offered by rvm
To solve this (assuming you use single-user installation of rvm) do:
1) ensure you have installed ubuntus readline and editline dev packages
sudo apt-get install libreadline6 libreadline6-dev
2) configure ruby's readline extension to use the systems libs, not rvm's packages
rvm pkg uninstall readline
cd ~/.rvm/src/ruby-1.9.2-p290/ext/readline
ruby extconf.rb --with-editline-dir=/usr/ --with-readline-dir=/usr/
make
make install
3) go to your project and start up the rails console
Tip: You can call
rvm requirements
to see what ubuntu packages should be installed to use rvm ruby
Problems with the rails console, RVM and readline
I had a similar problem it was with 1.9.2 on Ubuntu 10.04, but the symptoms were identical. In order to get it to work:
rvm pkg install readline
or prior to RVM version 1.6.32, you need the following command
rvm package install readline
Then:
apt-get install ncurses-dev
And then taking from their instructions at http://rvm.beginrescueend.com/packages/readline/
cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
ruby extconf.rb -- --with-readline-dir="$HOME/.rvm/usr"
make install
I had actually done a system rvm install on the server, so I needed to do this:
cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
ruby extconf.rb -- --with-readline-dir="/usr/local/rvm/usr"
make install
After that I was able to have full access to the console.
Why do I get a Readline error when trying to start rails console?
Please read the output of:
rvm requirements
It will show you list of libraries you need to install to make good use of Ruby
After installing all the libs, clean rvm installed libs and reinstall Ruby:
rm -rf $rvm_path/usr
rvm reinstall 1.9.3
Related Topics
Why Is Uri.Escape() Marked as Obsolete and Where Is This Regexp::Unsafe Constant
How to Update to Ruby 2.1.2 Using Rails 3.2.3
Programmatically Derive a Regular Expression from a String
What Is the Purpose of the Enumerator Class in Ruby
Fastercsv Error with Ruby 1.9.2
How to Know the Current Rake Task
Ruby Elegant Way to Return Min/Max If Value Outside Range
Multi Level Block Method Is Generating Issue
Is This the Best Way to Grab Common Elements from a Hash of Arrays
Alphabetize Arabic and Japanese Text That Is in Unicode
Clicking Link with JavaScript in Mechanize
Find Products Matching All Categories (Rails 3.1)
Upgraded to Ruby 1.9.2 and Getting Segmentation Fault Errors in Nokogiri