2012-03-19 148 views
2

我遇到以下錯誤。我在Ruby 1.9.2上使用RVM,並且都是完美的。我更新到Ruby 1.9.3版本,現在當我嘗試使用irb時出現加載錯誤。Ruby 1.9.3,RVM,readline不會安裝/編譯

/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 

您有什麼建議嗎?

+0

這聽起來像你只需要正常使用'寶石install'重新安裝相應的寶石。不同的rvm安裝有不同的寶石套裝。 'gem list'的輸出是什麼? – 2012-03-19 09:48:06

+0

'gem list'顯示我所有的寶石,'gem install'需要一個寶石名稱..我使用捆綁器來設置我的寶石..這工作良好 - 例如rails server很好用 – pabera 2012-03-19 09:59:29

+0

http://stackoverflow.com/ a/8201401/1062438 這有助於我的工作。 – pabera 2012-03-19 10:23:19

回答

2

您似乎忘了使用紅寶石:

rvm use 1.9.3 --default 

默認的標誌會告訴RVM使用它的新終端。

對於項目中使用(如導軌):

cd projects/my-app 
rvm use [email protected] --rvmrc --create 

,這將創造一個寶石my-app和項目配置文件.rvmrc - 現在當你CD到該目錄RVM WIL swithc到紅寶石@寶石。

有證據顯示RVM使用的基礎知識很不錯的截屏:http://screencasts.org/episodes/how-to-use-rvm

+0

我不知道這是否也可以完成這項工作。我在上面的註釋中使用了另一種方法。 – pabera 2012-03-20 08:30:21

+0

從你在問題文本中寫的內容來看,你有使用RVM的問題,休息看起來很好,甚至有問題運行autotool - readline被構建,你缺少'active_support ' - 所以加載gem時會出現問題,而這種情況很可能發生在您使用默認紅寶石但未使用的情況下 – mpapis 2012-03-20 11:50:49

相關問題