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