导轨控制台,RVM和readline的问题

我已经安装了rvm,以确保我的本地开发版本的ruby与我的服务器上的特定应用程序(ruby1.8.7)相同。 我已经完成了这个,并安装ruby1.8.7好。 但是,当我尝试启动导轨控制台时出现此错误:

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,然后安装ruby 1.8.7再次支持readline。 (实际上该页面使用ruby1.9.2作为例子,但我认为它应该与1.8.7一起工作,也许情况并非如此)。

但是,我仍然得到同样的错误。 有没有其他人通过这一点,并找出它?
感谢任何意见 – 最大

编辑 – 我使用Ubuntu 9.10 BTW的情况下,有关。

编辑 – 这是我的输出rvm info如下所示:

 $ 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,但症状是相同的。 为了得到它的工作:

 rvm pkg install readline 

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

 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安装,所以我需要这样做:

 cd $HOME/.rvm/src/ruby-1.9.2-p0/ext/readline ruby extconf.rb -- --with-readline-dir="/usr/local/rvm/usr" make install 

之后,我可以完全访问控制台。

运行命令

 rvm requirements 

它显示了需求和依赖关系。 安装这些,并在rvm上重新安装ruby

 rvm remove 1.9.2 rvm install 1.9.2 

有用!

我得到了同样的问题,并解决了它。 我检查http://rvm.beginrescueend.com/packages/readline/请检查以下2件事情:;

  1. sudo aptitude install libreadline5-dev libncurses5-dev使用libreadline6-dev ,如果你有一个新版本的话。
  2. ruby extconf.rb -- --with-readline-dir='/home/youruser/.rvm/usr/include/readline'确保你已经在你指定的with-readline-dir下有readline lib文件。

你有没有尝试这个教程使用brew的readline安装?

http://blog.plataformatec.com.br/2010/05/accented-chars-in-irb-with-rvm-and-ruby-1-8-7/

 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 https://rvm.io/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries. 

如果你按照这个链接 ,你会发现一些关于如何解决这个问题的说明。 第一步是为我工作,删除所有手动安装的软件包:

  $ rm -rf $rvm_path/usr 

接着

 $ rvm requirements $ rvm reinstall 1.9.3 

希望它的作品!

试过gem安装rb-readline

仍然没有工作。 所以开始irb并做了一个readline。 错误消息帮助。

  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 https://rvm.io/packages/readline/ . Be sure you 'rvm remove X ; rvm install X' to re-compile your ruby with readline support after obtaining the readline libraries. 1.9.3p327 :001 > require 'readline' LoadError: /usr/local/lib/libreadline.so.6: undefined symbol: UP - /home/sudhir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/x86_64-linux/readline.so from /home/sudhir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /home/sudhir/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from (irb):1 from /home/sudhir/.rvm/rubies/ruby-1.9.3-p327/bin/irb:16:in `<main>' 1.9.3p327 :002 > ^[[6^[[A^[[A^[[B^C^C 

所以在我的情况下,问题是所有libreadline *在/ usr / local / lib中。 我已经从源代码安装readline,这是搞砸了。

按照这里的说明来解决它。 http://vkarthickeyan.wordpress.com/2012/02/16/mysql-symbol-lookup-error-usrlocalliblibreadline-so-6-undefined-symbol-up/

我有这个问题与Ruby 2.1.3。 升级RVM,然后重新安装Ruby为我工作:

 rvm get stable rvm reinstall 2.1.3