简体   繁体   中英

RVM and/or Bundler: ERROR: Missing RVM environment file…

Just upgraded to RVM 1.23.4 and rubygems 2.1.8 now getting this error:

$ bundle update
ERROR: Missing RVM environment file: '/Users/meltemi/.rvm/environments/ruby-2.0.0-p0'

I haven't had 2.0.0-p0 installed for months...

$ rvm list 

rvm rubies

   ruby-1.9.2-p0 [ x86_64 ]
   ruby-1.9.2-p136 [ x86_64 ]
   ruby-1.9.2-p290 [ x86_64 ]
   ruby-1.9.2-rc2 [ x86_64 ]
   ruby-1.9.3-p392 [ x86_64 ]
=* ruby-2.0.0-p247 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

I'm not sure what's going on exactly. Anyone know how to fix this?

Edit: I've just noticed that since the update ~/.rvm/gems/ruby-2.0.0-p247@global is now a symlink. This wasn't the case before as ruby-2.0.0-p247@global used to be a standard directory.

~/.rvm/gems $ ls -l
. . .
drwxr-xr-x   8 meltemi  staff  272 May 13 18:12 ruby-2.0.0-p247
drwxr-xr-x  10 meltemi  staff  340 Jun 25 12:17 ruby-2.0.0-p247@app1
lrwxr-xr-x   1 meltemi  staff   62 Oct 11 09:15 ruby-2.0.0-p247@global -> /Users/meltemi/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/gems/2.0.0
drwxr-xr-x   8 meltemi  staff  272 May 13 18:40 ruby-2.0.0-p247@someapp
drwxr-xr-x   8 meltemi  staff  272 Mar  1  2013 ruby-2.0.0-p247@someotherapp
drwxr-xr-x   2 meltemi  staff   68 Aug  9  2010 ruby-head

So what's happened is I've lost my global gemset and all the gems rubygems-bunder , etc. that were in it!?!

How did this happen? Any way to recover?

You seems like create ruby-2.0.0-p0 environment file.

I not sure why don't you have that file(maybe deleted in accident).

Below is my ruby-2.0.0-p0 file. You can use it after modify path as your own.

export PATH ; PATH="/Users/humbroll/.rvm/gems/ruby-2.0.0-p0/bin:/Users/humbroll/.rvm/gems/ruby-2.0.0-p0@global/bin:/Users/humbroll/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/humbroll/.rvm/bin:$PATH"
export rvm_env_string ; rvm_env_string='ruby-2.0.0-p0'
export rvm_path ; rvm_path='/Users/humbroll/.rvm'
export rvm_ruby_string ; rvm_ruby_string='ruby-2.0.0-p0'
unset rvm_gemset_name
export RUBY_VERSION ; RUBY_VERSION='ruby-2.0.0-p0'
export GEM_HOME ; GEM_HOME='/Users/humbroll/.rvm/gems/ruby-2.0.0-p0'
export GEM_PATH ; GEM_PATH='/Users/humbroll/.rvm/gems/ruby-2.0.0-p0:/Users/humbroll/.rvm/gems/ruby-2.0.0-p0@global'
export MY_RUBY_HOME ; MY_RUBY_HOME='/Users/humbroll/.rvm/rubies/ruby-2.0.0-p0'
export IRBRC ; IRBRC='/Users/humbroll/.rvm/rubies/ruby-2.0.0-p0/.irbrc'
unset MAGLEV_HOME
unset RBXOPT

You may have an outdated file in /Users/meltemi/.rvm/bin/ , maybe it's the bundle file.

See this answer for more ideas.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM