Readline 错误阻止我运行 Rails 控制台
我的环境是rails 3.1,ruby 1.9.2,rvm,Xubuntu 11.10。
当我尝试在应用程序中运行 Rails 控制台时,我收到指向 readline 的 require 错误。
所以我尝试将 readline 作为 RVM 中的包安装,但这是我收到的错误:
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 :(
日志包含
[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
我尝试过的
$ rvm pkg install readline
$ rvm remove 1.9.2
$ rvm install 1.9.2 --with-readline-dir=$rvm_path/usr
后者
$ cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline
$ ruby extconf.rb
$ make install
让我
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
运行 'rails server' 有效,所以我认为问题出在 readline 。
谁能指出我正确的方向。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 Ubuntu 10.0.4 上遇到同样的问题并设法修复它:
Ran into the same problem on Ubuntu 10.0.4 and managed to fix it with:
我已经使用以下命令重新安装了 ruby 1.9.2,指向我的系统版本的 readline:
这似乎已经解决了我的问题,现在一切正常。
Rob
另外值得注意的是,rvm github 站点上存在匹配问题,应该很快就会修复:
https://github.com/wayneeseguin/rvm/issues/515
I've reinstall ruby 1.9.2 pointing at my system version of readline using this command:
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
Ubuntu 11.10。
对我来说以下工作有效:
首先安装rvm。
然后安装rvm要求的所有内容
然后安装 1.9.3 或其他版本。
Ubuntu 11.10.
For me the following worked:
First install rvm.
Then install everything from rvm requirements
Then install 1.9.3 or whatever.