rvm gemset copy error
I'm working out the details to move from ruby-1.8.7 to ruby-1.9.2 with rvm and I'm hitting an issue with copying gems from one ruby to another and I wanted to see if anyone knew what the deal is and why it my be erring.
I already have 1.9.2 installed, but running rvm gemset copy
is throwing an error.
[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/a开发者_Go百科damstacoviak/.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
... and here's the contents of the log file. I did update bundler as well since I saw that it mentioned bundler-1.0.12
was not found. Updating to bundler 1.0.12
didn't do the trick.
[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...
Any thoughts on why rvm gemset copy
is erring?
RVM is your friend and already knows how to upgrade your versions:
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
Type rvm help ugrade
at the command line.
Simply add the line to the file /usr/bin/gem (may be different on a mac) require 'rubygems/gem_runner' after require 'rubygems'
Found this over here
You could just use cp:
cp -R ~/.rvm/gems/ruby-1.8.7-p249/* ~/.rvm/gems/ruby-1.9.2-p180/
精彩评论