Ruby 1.9.3、RVM、readline 无法安装/编译

标签 ruby rvm readline

我遇到了以下错误。我将 RVM 与 Ruby 1.9.2 一起使用,一切都运行得很好。我更新到 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

你有什么建议吗?

最佳答案

看起来您可能忘记使用 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

关于Ruby 1.9.3、RVM、readline 无法安装/编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9767931/

相关文章:

ruby-on-rails - 如何使用 AuthLogic 模拟用户

ruby - 将压缩的字节字符串从protobuf转换为通过Logstash格式化的字节

Ruby 和 RVM 无法安装 ruby​​-1.9.3-p392

java - 从java套接字读取行终止符不一致的行

php - 预填充的阅读行

rust - Readline 自定义完成器

ruby-on-rails - 为什么我的产品上没有显示我的价格?

ruby - 以数组为键的哈希

ruby - 删除 rvm 后 vim 不加载 (libruby.so.1.8 : cannot open shared object file)

ruby-on-rails - Rails SSL 证书问题 + 来自 RVM 的神秘 "curl: Remote file name has no length!"