Ruby rvm gemset复制错误

Ruby rvm gemset复制错误,ruby,rvm,Ruby,Rvm,我正在研究使用rvm从ruby-1.8.7迁移到ruby-1.9.2的细节,我遇到了从一个ruby复制gems到另一个ruby的问题,我想看看是否有人知道这个交易是什么以及为什么会出错 我已经安装了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-

我正在研究使用rvm从ruby-1.8.7迁移到ruby-1.9.2的细节,我遇到了从一个ruby复制gems到另一个ruby的问题,我想看看是否有人知道这个交易是什么以及为什么会出错

我已经安装了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,因为我看到它提到了
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
出错,您有什么想法吗?

您可以使用cp:

cp -R ~/.rvm/gems/ruby-1.8.7-p249/* ~/.rvm/gems/ruby-1.9.2-p180/
只需将该行添加到文件中 /usr/bin/gem(在同一平台上可能不同 mac)需要“rubygems/gem_runner” 在“rubygems”之后


RVM是您的朋友,已经知道如何升级您的版本:

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帮助升级 用法: rvm升级[源ruby][目标ruby] 说明: 升级给定给的指定(已安装)源ruby 给定目标ruby版本。将迁移宝石集、包装器、别名 和环境文件。 该过程将在每个阶段提示您-如果版本看起来不正确, 请取消并手动执行。 示例: $rvm升级1.9.2-p136 1.9.2-p180 $rvm升级ree-2011.01 ree-2011-02
在命令行中键入
rvm help ugrade

这将无法确保gems兼容。看到锡人的回答了吗?这可能会因为当地司机的宝石而分崩离析。