【问题标题】:Ruby 1.9.3, RVM, readline won't install/compileRuby 1.9.3、RVM、readline 无法安装/编译
【发布时间】:2012-03-19 09:44:25
【问题描述】:

我遇到了以下错误。我将 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

你有什么建议吗?

【问题讨论】:

  • 听起来您只需要像往常一样使用gem install 重新安装适当的gem。不同的 rvm 安装有不同的 gem 集。 gem list 的输出是什么?
  • gem list 显示我所有的 gem,gem install 需要一个 gem 名称.. 我正在使用 bundler 来设置我的 gem.. 这很好用 - 例如 rails 服务器就很好用
  • stackoverflow.com/a/8201401/1062438 这对我有帮助并使它工作..
  • 您系统上安装的 readline 版本是什么?

标签: ruby rvm readline


【解决方案1】:

看起来你可能忘记使用红宝石了:

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

【讨论】:

  • 我不知道这是否也能完成这项工作。我在上面的评论中用另一种方法做到了..
  • 从您在问题文本中写的内容来看,您在使用 RVM 时遇到问题,休息看起来很好,即使运行 autotool 时出现问题 - 已构建 readline 并且您缺少 active_support - 所以有问题加载 gem,这很可能发生在你有默认 ruby​​ 但未使用时
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-08-17
  • 2013-01-13
  • 1970-01-01
  • 1970-01-01
  • 2012-07-23
相关资源
最近更新 更多