Ruby 1.9.3,RVM,readline不会安装/编译

时间:2012-03-19 09:44:26

标签: ruby rvm readline

我遇到了以下错误。我在Ruby 1.9.2中使用RVM,一切都很完美。我更新到ruby版本1.9.3现在我在尝试使用irb时遇到加载错误。

/home/pabera/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in 
`require': cannot load such file -- active_support (LoadError)

实际上我安装了所有的readline包(它在1.9.2下工作正常)

现在我尝试了几个想法,使用 rvm pkg readline 。这样做,我得到以下输出。

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

我在中间得到错误,我不知道如何解决它

Error running 'autoreconf -is --force', please read /home/pabera/.rvm/log/readline/autoreconf.log

我的Autoconf.log输出。这个autoconf问题可能导致我的问题吗?是的,那么我如何修复丢失的模板呢?

$ cat /home/pabera/.rvm/log/readline/autoreconf.log
[2012-03-19 10:07:03] 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
...
autoreconf: /usr/bin/autoheader failed with exit status: 1

你有什么建议吗?

1 个答案:

答案 0 :(得分:2)

看起来你可能忘了使用ruby:

rvm use 1.9.3 --default

默认标志将告诉rvm将其用于新终端。

用于项目(如rails):

cd projects/my-app
rvm use 1.9.3@my-app --rvmrc --create

这将创建一个gemset my-app和项目配置文件.rvmrc - 现在当你cd到那个目录时RVM将转向那个ruby @ gemset。

有非常好的截屏视频,显示了rvm使用的基础知识:http://screencasts.org/episodes/how-to-use-rvm