rvm gemset复制错误

时间:2011-04-13 03:24:42

标签: ruby rvm

我正在研究从ruby-1.8.7到rvm的ruby-1.9.2的细节,我遇到了将宝石从一个红宝石复制到另一个红宝石的问题,我想知道是否有人知道什么这笔交易是为什么我犯了错误。

我已经安装了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错误的任何想法?

3 个答案:

答案 0 :(得分:3)

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 help ugrade

答案 1 :(得分:0)

  

只需将该行添加到该文件即可   / usr / bin / gem(可能是不同的   mac)需要'rubygems / gem_runner'   在需要'rubygems'之后

Found this over here

答案 2 :(得分:-1)

你可以使用cp:

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