I\'m trying to deploy my Rails application to Heroku to test it out by following these instructions:
http://devcenter.heroku.com/articles/rails3#prerequisites
<If you happen to be using rbenv on Ubuntu
sudo apt-get install libreadline-dev
CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline" rbenv install 1.9.3-p125
as written up at http://vvv.tobiassjosten.net/ruby/readline-in-ruby-with-rbenv/
Sounds like readline gem is requires by your application but not specified in your Gemfile. Please try to add it.
Made it work for me!
gem 'rb-readline', "~> 0.5.0.pre.1", :require => false
Worked for me:
gem install rb-readline
iltempo and buru's answers helped me:
sudo apt-get install libreadline-dev
rvm remove 1.9.3
rvm install 1.9.3
Then add to your Gemfile:
gem 'rb-readline'
This link comes as the first in Google search so I'm going to clear up some confusion caused by the top answer.
The top answer is actually two answers merged into one. Both of them would fix your problem on their own, both have their strengths and weaknesses.
The first one is to install libreadline-dev
and recompile your Ruby. This causes Ruby to be compiled with C readline support. It's potentially faster but adds another C dependency to your Ruby and has it's own set of disadvantages (for example you cannot be sure your linux distribution ships with GNU readline that has more features but is on LGPL license). It also doesn't work on certain platforms (Windows).
The second one is to install rb-readline
, either by putting it in your Gemfile or by installing it globally (not recommended as you may switch to different Ruby version and have the same problem yet again). This is better for some because you now have pure-Ruby implementation that works on every platform but requires you to specify it in Gemfile (which shouldn't be much of a problem) and is potentially slower. To be honest I couldn't find any more problems with it.
The final choice is of course yours but if you're running multiple projects or multiple Ruby versions on the same machine, I'd go with installing libreadline-dev
or whatever your distribution requires, mostly because you only have to do it once and then all newly compiled Rubies will work out of the box. But if you're trying to run just this one project, use "weird" platform (Windows), rb-readline is probably way to go.