2011-04-13 73 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