rails 控制台、RVM 和 readline 的问题 [英] Problems with the rails console, RVM and readline

查看:51
本文介绍了rails 控制台、RVM 和 readline 的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 rvm,以确保我的本地 ruby​​ 开发版本与我使用的特定应用程序的服务器版本相同(ruby 1.8.7).我已经这样做了,并安装了 ruby​​ 1.8.7 ok.但是,当我尝试启动 rails 控制台时,出现此错误:

I've installed rvm as a way of making sure that my local development version of ruby is the same as my server's for a particular app i work on (ruby 1.8.7). I've done this, and installed ruby 1.8.7 ok. However, when i try to start the rails console i get this error:

Readline was unable to be required, if you need completion or history install readline then reinstall the ruby.
You may follow 'rvm notes' for dependencies and/or read the docs page http://rvm.beginrescueend.com/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries.
Couldn't load Wirble: no such file to load -- wirble

我已经阅读了错误所指页面上的注释(http://rvm.beginrescueend.com/packages/readline/),并按照说明进行操作,基本上包括安装readline,卸载ruby 1.8.7,然后使用 readline 支持再次安装 ruby​​ 1.8.7.(实际上,该页面使用 ruby​​ 1.9.2 作为示例,但我假设它也适用于 1.8.7.也许事实并非如此).

I've read the notes on the page that error refers to (http://rvm.beginrescueend.com/packages/readline/), and followed the instructions, which involve basically installing readline, uninstalling ruby 1.8.7, then installing ruby 1.8.7 again with readline support. (actually that page uses ruby 1.9.2 as an example but i'm assuming it should work with 1.8.7 as well. Perhaps that's not the case).

但是,我仍然遇到同样的错误.有没有其他人经历过这个并弄清楚了吗?
感谢任何建议 - 最大

But, i still get the same error. Has anyone else been through this and figured it out?
Grateful for any advice - max

编辑 - 我正在使用 Ubuntu 9.10 btw,以防万一.

EDIT - i'm using Ubuntu 9.10 btw in case that's relevant.

编辑 - 这是我对 rvm info 的输出,如下要求:

EDIT - here's my output for rvm info as asked for below:

$ rvm info

system:

  system:
    uname:       "Linux max-laptop 2.6.31-22-generic #68-Ubuntu SMP Tue Oct 26 16:38:35 UTC 2010 i686 GNU/Linux"
    bash:        "/bin/bash => GNU bash, version 4.0.33(1)-release (i486-pc-linux-gnu)"
    zsh:         " => not installed"

  rvm:
    version:      "rvm 1.1.6 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]"

  homes:
    gem:          "not set"
    ruby:         "not set"

  binaries:
    ruby:         "/usr/bin/ruby"
    irb:          "/usr/bin/irb"
    gem:          "/usr/bin/gem"
    rake:         "/usr/bin/rake"

  environment:
    PATH:         "/home/max/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/var/lib/gems/1.8/bin:/home/max/software/svnmerge:/home/max/.gem/ruby/1.8/bin:/home/max/work/e_learning_resource/trunk/public/assets/dvd_files/bin:/opt/firefox:/home/max/.rvm/bin:/home/max/.rvm/bin"
    GEM_HOME:     ""
    GEM_PATH:     ""
    MY_RUBY_HOME: ""
    IRBRC:        ""
    RUBYOPT:      ""
    gemset:       ""

推荐答案

我在 Ubuntu 10.04 上的 1.9.2 遇到了类似的问题,但症状是相同的.为了让它工作:

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

或者RVM 1.6.32之前的版本,需要以下命令

or prior to RVM version 1.6.32, you need the following command

rvm package install readline

那么:

apt-get install ncurses-dev

然后在 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

我实际上已经在服务器上安装了系统 rvm,所以我需要这样做:

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.

这篇关于rails 控制台、RVM 和 readline 的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆