簡體   English   中英

在Mac OS X Lion上安裝rails 3.1時找不到文件'lib'

[英]file 'lib' not found when installing rails 3.1 on Mac OS X Lion

我剛剛安裝了rvm然后使用以下命令導航3.1rc5:

gem install rails --pre

但是在“安裝ri文檔”和RDoc文檔之后我遇到了一些錯誤:

Successfully installed <bunch of things>
30 gems installed
Installing ri documentation for multi_json-1.0.3...
Installing ri documentation for activesupport-3.1.0.rc5...
Installing ri documentation for builder-3.0.0...
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README.rdoc, skipping
Installing ri documentation for i18n-0.6.0...
Installing <tons more documentation>
Installing ri documentation for rails-3.1.0.rc5...
file 'lib' not found
Installing RDoc documentation for multi_json-1.0.3...
Installing RDoc documentation for activesupport-3.1.0.rc5...
Installing RDoc documentation for builder-3.0.0...
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README, skipping
unable to convert "\xF1" from ASCII-8BIT to UTF-8 for README.rdoc, skipping
Installing RDoc documentation for i18n-0.6.0...
Installing <tons more documentation>
Installing RDoc documentation for rails-3.1.0.rc5...
file 'lib' not found

README文件問題似乎不是什么大問題,但找不到“lib”文件聽起來有點可怕..為什么這樣做? 一些搜索顯示其他人遇到此問題並使用gem install rdoc修復它,然后重新運行gem install rails --pre 但這仍然給我相同的lib文件遺漏了錯誤。

嘗試使用rvm gemset install rails --pre

安裝RDoc為我解決了這個問題。 我必須在我使用的gemset中這樣做。

rvm use rubyversion@gemset
gem install rdoc

在此之后,我可以在沒有“ 找不到文件'lib'錯誤的情況下安裝寶石。

我在Windows上安裝了3.1.0(不是rc8,但最終版本),並且找不到“找不到文件'lib'”錯誤,同時安裝了ri和RDoc。 當我輸入'which ruby​​'時,我看到它安裝在c:/ ruby​​192 / bin目錄中。 我必須為自己創建一個.rvm目錄 - 它不是作為安裝的一部分創建的。

當然, - no-rdoc --no-ri工作了。 --pre命令安裝了rc8而不是最終版本。

是什么賦予了?

我在Mac OS X Lion上使用rails 3.0.9遇到了同樣的問題,並且“rvm gemset install rails”技巧解決了它!

$ rvm gemset install rails
installing rails ...
rails  installed.
$ rails -v
Rails 3.0.9

謝謝 !

之前我遇到過類似的問題,而我的解決方案是:嘗試使用ruby 1.9.2-head而不是ruby 1.9.2-p290。

rvm install ruby-1.9.2-head
rvm use ruby-1.9.2-head --default

然后,再次安裝rails 3.1。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM