我已经安装了 rvm 和 ruby 1.9.2,它们都可以正常工作。使用 rvm 版本 1.10.2。我以前安装了 rvm 包 readline/zlib,但现在我在使用 readline 时遇到了大麻烦。我正在尝试在 rvm 中安装 ruby 1.9.3,但我总是找不到 readline。
我试图遵循不同的解决方案:
rvm remove 1.9.3
rvm pkg install readline
rvm install 1.9.3 --with-readline-dir=$rvm_path/usr/ \
--with-zlib-dir=$rvm_path/usr/
rvm use 1.9.3
rvmsudo gem install bundler
bundle install (all gems installed fine)
rails c / rails s
.rvm/rubies/ruby-1.9.3-p0/lib/ruby/1.9.1/irb/completion.rb:9:in `require': \
cannot load such file -- readline (LoadError)
我安装了 libreadline-dev (版本 6,当前版本)(这些软件包所需的一切)
我还尝试了以下方法:
.rvm/src/ruby-1.9.3-p0/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... no
checking for readline() in -ledit... no
checking for editline/readline.h... no
.rvm/src/ruby-1.9.3-p0/ext/readline]$ ruby extconf.rb \
--with-readline-dir=/home/claudiocontin/.rvm/usr/
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
.rvm/src/ruby-1.9.3-p0/ext/readline]$ ruby extconf.rb \
--with-readline-lib=/home/claudiocontin/.rvm/usr/
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
Makefile当然不会生成...
apt-get install libreadline-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libreadline-dev is already the newest version.
想法?