Reputation: 8257
My environment is rails 3.1, ruby 1.9.2, rvm, Xubuntu 11.10.
When I try to run the rails console within an app, I am getting require errors pointing at readline.
So I am trying to install readline as a package within RVM, but this is the error I am getting:
Applying patch '/home/rob/.rvm/patches/readline-6.2/patch-shobj-conf.diff'...
ERROR: Error running 'patch -p0 -f < /home/rob/.rvm/patches/readline-6.2/patch-shobj- conf.diff', please read /home/rob/.rvm/log/readline/patch.log
ERROR: Patch /home/rob/.rvm/patches/readline-6.2/patch-shobj-conf.diff did not apply cleanly... back to the patching board :(
The log contains
[2011-10-26 10:16:30] patch -p0 -f < /home/rob/.rvm/patches/readline-6.2/patch-shobj-conf.diff
patching file support/shobj-conf
Hunk #1 FAILED at 157.
1 out of 2 hunks FAILED -- saving rejects to file support/shobj-conf.rej
I've tried
$ rvm pkg install readline
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-readline-dir=$rvm_path/usr
And
$ cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
$ ruby extconf.rb
$ make install
The latter gives me
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... no
checking for readline() in -ledit... no
checking for editline/readline.h... no
Running 'rails server' works, so I think the problem is just with readline.
Can anyone point me in the right direction.
Upvotes: 6
Views: 2410
Reputation: 2536
Ubuntu 11.10. For me the following worked: First install rvm. Then install everything from rvm requirements Then install 1.9.3 or whatever.
Upvotes: 0
Reputation: 479
Ran into the same problem on Ubuntu 10.0.4 and managed to fix it with:
rvm uninstall 1.9.2
sudo apt-get install libreadline-dev
rvm install 1.9.2 --with-readline-dir=/usr/include/readline
Upvotes: 6
Reputation: 8257
I've reinstall ruby 1.9.2 pointing at my system version of readline using this command:
rvm install 1.9.2 --with-readline-dir=/usr/include/readline
That seems to have fixed my problem and everything is now working.
Rob
Also worth noting that a matching issue exists on the rvm github site and it should be fixed soon: https://github.com/wayneeseguin/rvm/issues/515
Upvotes: 1