2011-04-13 79 views
3

我正在制定從ruby-1.8.7到rvm的ruby-1.9.2的詳細信息,我遇到了將一個ruby複製到另一個ruby的問題,我想看看如果有人知道這筆交易是什麼,爲什麼我會犯錯。rvm gemset複製錯誤

我已經安裝了1.9.2,但運行rvm gemset copy卻出現錯誤。

[22:11][adamstacoviak:~]$ rvm gemset copy ruby-1.8.7-p249 ruby-1.9.2-p180 
Copying gemset from ruby-1.8.7-p249 to ruby-1.9.2-p180 
cp: cannot overwrite directory /Users/adamstacoviak/.rvm/gems/ruby-1.9.2-p180/cache with non-directory /Users/adamstacoviak/.rvm/gems/ruby-1.8.7-p249/cache 
Making gemset for ruby-1.9.2-p180 pristine. 
ERROR: Error running 'rvm gemset pristine' under , 
please read /Users/adamstacoviak/.rvm/log/ruby-1.8.7-p249/gemset.pristine.log 

...這裏是日誌文件的內容。我也更新了捆綁器,因爲我看到它提到bundler-1.0.12未找到。更新到bundler 1.0.12沒有辦法。

[2011-04-12 22:09:54] rvm gemset pristine # under ruby-1.9.2-p180 
ERROR: While executing gem ... (NameError) 
    uninitialized constant Gem::RemoteFetcher 
Restoring gem(s) to pristine condition... 
Cached gem for bundler-1.0.12 not found, attempting to fetch... 
[2011-04-12 22:14:26] rvm gemset pristine # under ruby-1.9.2-p180 
ERROR: While executing gem ... (NameError) 
    uninitialized constant Gem::RemoteFetcher 
Restoring gem(s) to pristine condition... 
Cached gem for bundler-1.0.12 not found, attempting to fetch... 

爲什麼rvm gemset copy是犯錯有什麼想法?

回答

-1

你可以只使用CP:

cp -R ~/.rvm/gems/ruby-1.8.7-p249/* ~/.rvm/gems/ruby-1.9.2-p180/ 
+0

這不能確保寶石兼容。看到錫文的回答 – Wes 2011-04-13 04:28:21

+0

這可能會崩潰與本土司機的寶石。 – 2011-04-13 04:30:07

0

只需將行添加到文件 的/ usr/bin中/寶石(可能是在 MAC不同的)都需要 '的RubyGems/gem_runner' 後需要 'RubyGems的'

Found this over here

3

RVM是你的朋友和已經ķ nows如何升級你的版本:

 
rvm help upgrade 

Usage: 

    rvm upgrade [source ruby] [destination ruby] 

Description: 

    Upgrades the specified (already installed) source ruby given to the 
    given destination ruby version. Will migrate gemsets, wrappers, aliases 
    and environment files. 

    The process will prompt you at each stage - if the versions look incorrect, 
    please cancel and perform it manually. 


Examples: 

    $ rvm upgrade 1.9.2-p136 1.9.2-p180 

    $ rvm upgrade ree-2011.01 ree-2011-02 

在命令行輸入rvm help ugrade