如何在Ubuntu 11.10上使用RVM在IRB中获得Readline支持 [英] How to get Readline support in IRB using RVM on Ubuntu 11.10

查看:105
本文介绍了如何在Ubuntu 11.10上使用RVM在IRB中获得Readline支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尽一切努力使它正常工作,但无济于事,所以在这里,我要求提供有关调试的建议.

I have tried everything I can think of to get this to work, to no avail so here I am requesting suggestions on how to debug.

首先,运行Ubuntu 11.10

Firstly, runnning Ubuntu 11.10

已安装的rvm:

$ bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

使用apt-get安装readline:

Installed readline using apt-get:

$ sudo apt-get install libreadline-dev

检查readline安装:

Check for readline install:

$ dpkg --get-selections | grep readline
lib64readline-gplv2-dev             install
lib64readline5                  install
libreadline-dev                 install
libreadline5                    install
libreadline6                    install
libreadline6-dev                install
readline-common                 install

安装ruby,并支持readline吗?

Install ruby, with readline support?

$ rvm install 1.9.2 --with-readline-dir=/usr

这是rvm版本:

$ rvm --version

rvm 1.9.2 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]

让我们尝试一下红宝石外壳:

Lets try the ruby shell:

$ irb
1.9.2 :001 > puts "add history"
add history
 => nil 
1.9.2 :002 > ^[[A^[[A^[[A^[[A^[[A <------ PRESS UP ARROW DOES THIS

否,好的,如果它不能与ubuntu的readline版本一起使用???让我们尝试使用rvm自己的readline版本:

No, ok so if its not going to work with ubuntu's readline version??? lets try with rvm's own version of readline:

$ rvm pkg install readline
Fetching readline-5.2.tar.gz to /home/keith/.rvm/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1989k  100 1989k    0     0   318k      0  0:00:06  0:00:06 --:--:--  418k
Extracting readline-5.2.tar.gz to /home/keith/.rvm/src
Applying patch '/home/keith/.rvm/patches/readline-5.2/shobj-conf.patch'...
Prepare readline in /home/keith/.rvm/src/readline-5.2.
ERROR: Error running 'autoreconf -is --force', please read /home/keith/.rvm/log/readline/autoreconf.log
Configuring readline in /home/keith/.rvm/src/readline-5.2.
Compiling readline in /home/keith/.rvm/src/readline-5.2.
Installing readline to /home/keith/.rvm/usr
Fetching readline-6.2.tar.gz to /home/keith/.rvm/archives
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2224k  100 2224k    0     0   310k      0  0:00:07  0:00:07 --:--:--  444k
Extracting readline-6.2.tar.gz to /home/keith/.rvm/src
Applying patch '/home/keith/.rvm/patches/readline-6.2/patch-shobj-conf.diff'...
Prepare readline in /home/keith/.rvm/src/readline-6.2.
ERROR: Error running 'autoreconf -is --force', please read /home/keith/.rvm/log/readline/autoreconf.log
Configuring readline in /home/keith/.rvm/src/readline-6.2.
Compiling readline in /home/keith/.rvm/src/readline-6.2.
Installing readline to /home/keith/.rvm/usr

好的,那里有一个错误,让我们看一下:

Ok, there's an error there, lets take a look:

$ more /home/keith/.rvm/log/readline/autoreconf.log
[2011-11-17 22:31:15] autoreconf -is --force
autoheader: warning: missing template: CTYPE_NON_ASCII
autoheader: Use AC_DEFINE([CTYPE_NON_ASCII], [], [Description])
autoheader: warning: missing template: FIONREAD_IN_SYS_IOCTL
autoheader: warning: missing template: HAVE_BSD_SIGNALS
autoheader: warning: missing template: HAVE_GETPW_DECLS
autoheader: warning: missing template: HAVE_LANGINFO_CODESET
autoheader: warning: missing template: HAVE_MBRLEN
autoheader: warning: missing template: HAVE_MBSCMP
autoheader: warning: missing template: HAVE_MBSNRTOWCS
autoheader: warning: missing template: HAVE_MBSRTOWCS
autoheader: warning: missing template: HAVE_MBSTATE_T
autoheader: warning: missing template: HAVE_POSIX_SIGNALS
autoheader: warning: missing template: HAVE_POSIX_SIGSETJMP
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_FILENO
autoheader: warning: missing template: HAVE_STRUCT_DIRENT_D_INO
autoheader: warning: missing template: HAVE_USG_SIGHOLD
autoheader: warning: missing template: HAVE_WCRTOMB
autoheader: warning: missing template: HAVE_WCSCOLL
autoheader: warning: missing template: HAVE_WCSDUP
autoheader: warning: missing template: HAVE_WCTYPE
autoheader: warning: missing template: HAVE_WCWIDTH
autoheader: warning: missing template: MUST_REINSTALL_SIGHANDLERS
autoheader: warning: missing template: NO_MULTIBYTE_SUPPORT
autoheader: warning: missing template: SPEED_T_IN_SYS_TYPES
autoheader: warning: missing template: STRCOLL_BROKEN
autoheader: warning: missing template: STRUCT_WINSIZE_IN_SYS_IOCTL
autoheader: warning: missing template: STRUCT_WINSIZE_IN_TERMIOS
autoheader: warning: missing template: TIOCSTAT_IN_SYS_IOCTL
autoheader: warning: missing template: VOID_SIGHANDLER
autoreconf: /usr/bin/autoheader failed with exit status: 1

并且正如预期的那样,irb无法与readline一起使用:

And as expected irb isn't working with readline:

$ rvm install 1.8.7 --with-readline-dir=\$HOME/.rvm/usr
Installing Ruby from source to: /home/keith/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...

ruby-1.8.7-p352 - #fetching 
ruby-1.8.7-p352 - #extracting ruby-1.8.7-p352 to /home/keith/.rvm/src/ruby-1.8.7-p352
ruby-1.8.7-p352 - #extracted to /home/keith/.rvm/src/ruby-1.8.7-p352
Applying patch 'stdout-rouge-fix' (located at /home/keith/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ruby-1.8.7-p352 - #configuring 
ruby-1.8.7-p352 - #compiling 
ruby-1.8.7-p352 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.8.7-p352 ...
Installation of rubygems completed successfully.
ruby-1.8.7-p352 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.8.7-p352 - #importing default gemsets (/home/keith/.rvm/gemsets/)
Install of ruby-1.8.7-p352 - #complete 
$ irb
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.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.
1.8.7 :001 > 

我是否已安装所有rvm要求?是的,在这里看看:

Have I installed all the rvm requirements? Yes here look:

$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'
autoconf is already the newest version.
automake is already the newest version.
bison is already the newest version.
build-essential is already the newest version.
curl is already the newest version.
git-core is already the newest version.
libc6-dev is already the newest version.
libncurses5-dev is already the newest version.
libreadline6 is already the newest version.
libreadline6-dev is already the newest version.
libreadline6-dev set to manually installed.
libsqlite3-0 is already the newest version.
libsqlite3-dev is already the newest version.
libssl-dev is already the newest version.
libtool is already the newest version.
libxml2-dev is already the newest version.
libxslt1-dev is already the newest version.
libyaml-dev is already the newest version.
openssl is already the newest version.
sqlite3 is already the newest version.
subversion is already the newest version.
zlib1g is already the newest version.
zlib1g-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

所以它一直在不断,然后不断.....

And so it goes on, and on and on and on.....

$ rvm remove 1.8.7
Removing /home/keith/.rvm/src/ruby-1.8.7-p352...
Removing /home/keith/.rvm/rubies/ruby-1.8.7-p352...
Removing ruby-1.8.7-p352 aliases...
Removing ruby-1.8.7-p352 wrappers...
Removing ruby-1.8.7-p352 environments...
Removing ruby-1.8.7-p352 binaries...

$ rvm install 1.8.7 --with-readline-dir=\$HOME/.rvm/usr
Installing Ruby from source to: /home/keith/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...

ruby-1.8.7-p352 - #fetching 
ruby-1.8.7-p352 - #extracting ruby-1.8.7-p352 to /home/keith/.rvm/src/ruby-1.8.7-p352
ruby-1.8.7-p352 - #extracted to /home/keith/.rvm/src/ruby-1.8.7-p352
Applying patch 'stdout-rouge-fix' (located at /home/keith/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ruby-1.8.7-p352 - #configuring 
ruby-1.8.7-p352 - #compiling 
ruby-1.8.7-p352 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.8.7-p352 ...
Installation of rubygems completed successfully.
ruby-1.8.7-p352 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.8.7-p352 - #importing default gemsets (/home/keith/.rvm/gemsets/)
Install of ruby-1.8.7-p352 - #complete 

$ irb
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.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.
1.8.7 :001 > 

$ cd ~/.rvm/src/ruby-1.8.7-p352/ext/readline/
$ ruby extconf.rb 
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... yes
checking for rl_filename_completion_function()... yes
checking for rl_username_completion_function()... yes
checking for rl_completion_matches()... yes
checking for rl_deprep_term_function in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_completion_append_character in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_basic_word_break_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_completer_word_break_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_basic_quote_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_completer_quote_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_filename_quote_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_attempted_completion_over in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_library_version in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_event_hook in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_cleanup_after_signal()... yes
checking for rl_clear_signals()... yes
checking for rl_vi_editing_mode()... yes
checking for rl_emacs_editing_mode()... yes
checking for replace_history_entry()... yes
checking for remove_history()... yes
creating Makefile

$ make
gcc -shared -o readline.so readline.o -L. -L/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -Wl,-R/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -L.  -rdynamic -Wl,-export-dynamic    -Wl,-R -Wl,/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lreadline -lncurses  -lrt -ldl -lcrypt -lm   -lc

$ make install
/usr/bin/install -c -m 0755 readline.so /home/keith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/i686-linux

$ rvm remove 1.8.7
Removing /home/keith/.rvm/src/ruby-1.8.7-p352...
Removing /home/keith/.rvm/rubies/ruby-1.8.7-p352...
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Removing ruby-1.8.7-p352 aliases...
Removing ruby-1.8.7-p352 wrappers...
Removing ruby-1.8.7-p352 environments...
Removing ruby-1.8.7-p352 binaries...

$ rvm install 1.8.7 --with-readline-dir=\$HOME/.rvm/usr
Installing Ruby from source to: /home/keith/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...
ruby-1.8.7-p352 - #fetching 
ruby-1.8.7-p352 - #extracting ruby-1.8.7-p352 to /home/keith/.rvm/src/ruby-1.8.7-p352
ruby-1.8.7-p352 - #extracted to /home/keith/.rvm/src/ruby-1.8.7-p352
Applying patch 'stdout-rouge-fix' (located at /home/keith/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ruby-1.8.7-p352 - #configuring 
ruby-1.8.7-p352 - #compiling 
ruby-1.8.7-p352 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.8.7-p352 ...
Installation of rubygems completed successfully.
ruby-1.8.7-p352 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.8.7-p352 - #importing default gemsets (/home/keith/.rvm/gemsets/)
Install of ruby-1.8.7-p352 - #complete 

$ irb
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.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.
1.8.7 :001 > $ 

$ rvm pkg install readline
Fetching readline-5.2.tar.gz to /home/keith/.rvm/archives
Extracting readline-5.2.tar.gz to /home/keith/.rvm/src
Applying patch '/home/keith/.rvm/patches/readline-5.2/shobj-conf.patch'...
Prepare readline in /home/keith/.rvm/src/readline-5.2.
ERROR: Error running 'autoreconf -is --force', please read /home/keith/.rvm/log/readline/autoreconf.log
Configuring readline in /home/keith/.rvm/src/readline-5.2.
Compiling readline in /home/keith/.rvm/src/readline-5.2.
Installing readline to /home/keith/.rvm/usr
Fetching readline-6.2.tar.gz to /home/keith/.rvm/archives
Extracting readline-6.2.tar.gz to /home/keith/.rvm/src
Applying patch '/home/keith/.rvm/patches/readline-6.2/patch-shobj-conf.diff'...
Prepare readline in /home/keith/.rvm/src/readline-6.2.
ERROR: Error running 'autoreconf -is --force', please read /home/keith/.rvm/log/readline/autoreconf.log
Configuring readline in /home/keith/.rvm/src/readline-6.2.
Compiling readline in /home/keith/.rvm/src/readline-6.2.
Installing readline to /home/keith/.rvm/usr

$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'
autoconf is already the newest version.
automake is already the newest version.
bison is already the newest version.
build-essential is already the newest version.
curl is already the newest version.
git-core is already the newest version.
libc6-dev is already the newest version.
libncurses5-dev is already the newest version.
libreadline6 is already the newest version.
libreadline6-dev is already the newest version.
libreadline6-dev set to manually installed.
libsqlite3-0 is already the newest version.
libsqlite3-dev is already the newest version.
libssl-dev is already the newest version.
libtool is already the newest version.
libxml2-dev is already the newest version.
libxslt1-dev is already the newest version.
libyaml-dev is already the newest version.
openssl is already the newest version.
sqlite3 is already the newest version.
subversion is already the newest version.
zlib1g is already the newest version.
zlib1g-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ cd ~/.rvm/src/ruby-1.8.7-p352/ext/readline/

$ ruby extconf.rb --with-readline-dir=/usr
checking for tgetnum() in -lncurses... yes
checking for readline/readline.h... yes
checking for readline/history.h... yes
checking for readline() in -lreadline... yes
checking for rl_filename_completion_function()... yes
checking for rl_username_completion_function()... yes
checking for rl_completion_matches()... yes
checking for rl_deprep_term_function in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_completion_append_character in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_basic_word_break_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_completer_word_break_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_basic_quote_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_completer_quote_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_filename_quote_characters in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_attempted_completion_over in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_library_version in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_event_hook in stdio.h,readline/readline.h,readline/history.h... yes
checking for rl_cleanup_after_signal()... yes
checking for rl_clear_signals()... yes
checking for rl_vi_editing_mode()... yes
checking for rl_emacs_editing_mode()... yes
checking for replace_history_entry()... yes
checking for remove_history()... yes
creating Makefile

$ make
gcc -I. -I. -I/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/i686-linux -I. -DHAVE_READLINE_READLINE_H -DHAVE_READLINE_HISTORY_H -DHAVE_RL_FILENAME_COMPLETION_FUNCTION -DHAVE_RL_USERNAME_COMPLETION_FUNCTION -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_DEPREP_TERM_FUNCTION -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_BASIC_WORD_BREAK_CHARACTERS -DHAVE_RL_COMPLETER_WORD_BREAK_CHARACTERS -DHAVE_RL_BASIC_QUOTE_CHARACTERS -DHAVE_RL_COMPLETER_QUOTE_CHARACTERS -DHAVE_RL_FILENAME_QUOTE_CHARACTERS -DHAVE_RL_ATTEMPTED_COMPLETION_OVER -DHAVE_RL_LIBRARY_VERSION -DHAVE_RL_EVENT_HOOK -DHAVE_RL_CLEANUP_AFTER_SIGNAL -DHAVE_RL_CLEAR_SIGNALS -DHAVE_RL_VI_EDITING_MODE -DHAVE_RL_EMACS_EDITING_MODE -DHAVE_REPLACE_HISTORY_ENTRY -DHAVE_REMOVE_HISTORY -I/usr/include  -D_FILE_OFFSET_BITS=64  -fPIC -g -O2  -fPIC   -c readline.c
gcc -shared -o readline.so readline.o -L. -L/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -Wl,-R/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -L/usr/lib -Wl,-R/usr/lib -L.  -rdynamic -Wl,-export-dynamic    -Wl,-R -Wl,/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -L/home/keith/.rvm/rubies/ruby-1.8.7-p352/lib -lruby -lreadline -lncurses  -lrt -ldl -lcrypt -lm   -lc

$ make install
/usr/bin/install -c -m 0755 readline.so /home/keith/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/site_ruby/1.8/i686-linux

$ irb
ruby-1.8.7-p352 :001 > p 1
1
 => nil 
ruby-1.8.7-p352 :002 > $   

$ rvm remove 1.8.7
Removing /home/keith/.rvm/src/ruby-1.8.7-p352...
Removing /home/keith/.rvm/rubies/ruby-1.8.7-p352...
Removing ruby-1.8.7-p352 aliases...
Removing ruby-1.8.7-p352 wrappers...
Removing ruby-1.8.7-p352 environments...
Removing ruby-1.8.7-p352 binaries...

$ rvm install 1.8.7 --with-readline-dir=/usr
Installing Ruby from source to: /home/keith/.rvm/rubies/ruby-1.8.7-p352, this may take a while depending on your cpu(s)...

ruby-1.8.7-p352 - #fetching 
ruby-1.8.7-p352 - #extracting ruby-1.8.7-p352 to /home/keith/.rvm/src/ruby-1.8.7-p352
ruby-1.8.7-p352 - #extracted to /home/keith/.rvm/src/ruby-1.8.7-p352
Applying patch 'stdout-rouge-fix' (located at /home/keith/.rvm/patches/ruby/1.8.7/stdout-rouge-fix.patch)
ruby-1.8.7-p352 - #configuring 
ruby-1.8.7-p352 - #compiling 
ruby-1.8.7-p352 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ruby-1.8.7-p352 ...
Installation of rubygems completed successfully.
ruby-1.8.7-p352 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.8.7-p352 - #importing default gemsets (/home/keith/.rvm/gemsets/)
Install of ruby-1.8.7-p352 - #complete 

$ irb
1.8.7 :001 > p "hello world"
"hello world"
 => nil 
1.8.7 :002 > ^[[A^[[A^[[A^[[A^[[A

因此,总而言之,如果能发出一些鲜亮的火花来建议我如何调试这种情况并解决问题,我将非常感激.

So in conclusion, I would be exceptionally grateful if some bright spark could suggest how I can debug this situation and resolve.

ps-是的,我有"Google"这个问题要死....

ps - Yes I have "Google" this problem to death....

推荐答案

好吧,这似乎很明显,而且总是在您知道答案的时候:

Ok, so this might seem pretty obvious, well it always is when you know the answer:

我放弃了使用RVM,转而使用rbenv-我很高兴自己做到了!

I gave up using RVM, and switched to rbenv - which I'm very pleased I did!

sudo apt-get install libreadline-gplv2-dev
CONFIGURE_OPTS="--with-readline-dir=/usr/include/readline --with-openssl-dir=/usr/local" rbenv-install 1.9.2-p290

此安装没有错误-我仍然不相信我需要gplv2软件包,因为我已经安装了libreadline6-dev.但是,仍然无法解决我的问题.它确实从方程式中删除了RVM,并向我展示了尽管我已尽了最大努力,但IRB shell仍拒绝使用readline.

This installed without error - and I'm still not convinced I need the gplv2 package as I've got libreadline6-dev installed. However that STILL didn't resolve my problem. It did remove RVM from the equation, and show me that despite my best efforts the IRB shell was refusing to use readline.

答案来自阅读这份出色的指南:

The answer came from reading through this great guide:

RubyTools.pdf

在我的〜/.irbrc文件中:

Inside my ~/.irbrc file I found:

IRB.conf[:USE_READLINE] = false

快速更新至:

IRB.conf[:USE_READLINE] = true

我正在用煤气做饭!

感谢所有出色的回答和建议,非常感谢您的宝贵时间.

Thanks for all the great answers and suggestion, I do appreciate your time.

这篇关于如何在Ubuntu 11.10上使用RVM在IRB中获得Readline支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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