错误:缺少RVM环境文件执行rvm upgrade命令后 - Passenger 4.0.23 [英] ERROR: Missing RVM environment file After Doing rvm upgrade command - Passenger 4.0.23

查看:89
本文介绍了错误:缺少RVM环境文件执行rvm upgrade命令后 - Passenger 4.0.23的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac Mini服务器上运行ruby 2.0.0-p247(Mavericks 10.9.1)。我读到有一个安全漏洞,所以我决定升级到使用最新的Ruby补丁2.0.0-p353。我做了以下命令:

$ p $ gem update --system(RubyGems 2.1.11)
rvm get stable(RVM 1.25.0)
rvm upgrade 2.0.0-p247 2.0.0-p353(它应该已经移动了我的宝石)

在我的系统中没有任何东西可以在rvm中找到引用2.0.0-p247,这正是我所期望的。当我进入〜/ myuser / .rvm / environments时,没有文件2.0.0-p247。



我现在正在尝试启动乘客。我安装了4.0.23版企业版。我尝试运行 rvmsudo passenger-install-apache2-module 但出现错误。

  cd /Users/myuser/.rvm/gems/ruby-2.0.0-p353@mygemset/gems/passenger-enterprise-server-4.0.23 
/Users/myuser/.rvm/wrappers/ ruby-2.0.0-p353 @ mygemset / rake apache2:clean apache2 RELEASE = yes
#/Users/myuser/.rvm/wrappers/ruby-2.0.0-p353@mygemset/rake apache2:clean apache2 RELEASE = yes
错误:缺少RVM环境文件:'/Users/myuser/.rvm/environments/ruby-2.0.0-p247@LightBeCorp_Rails4Ruby2'

以下是与rvm相关的.bashrc文件中的语句,如果这会有所帮助的话。

  [[-s$ HOME / .rvm / scripts / rvm]] 
PATH =$ PATH:$ HOME /.rvm/gems/ruby-1.9.3-p327@mygemset/bin:/ .rvm /红宝石/红宝石1.9.3-P327 /斌/红宝石:/ RVM /红宝石/红宝石1.9.3-P448 /斌/红宝石:/ RVM /红宝石/红宝石2.0.0-P353 / bin中/ ruby​​:/ usr / bin / psql:/ usr / local:/ usr / local / sbin:/ usr / local / bin:/ usr / sbin:/ usr / bin

我做了一个 rvm列表红宝石命令。 ruby-2.0.0-p247没有列出。



任何帮助将不胜感激。我会继续寻找。我计划在Phusion Passenger组发布一个链接。



UPDATE 12/21/2013 12:20 pm



因为我不再在我的Rails应用程序中使用其他红宝石,所以我更新了我的.bashrc文件。当我尝试运行 rvmsudo passenger-install-apache2-module 时,我仍然遇到错误。

  [[-s$ HOME / .rvm / scripts / rvm]] 
PATH =$ PATH:$ HOME / .rvm / rubies / ruby​​-2.0.0-p353 / bin / ruby​​:/ usr / bin / psql:/ usr / local:/ usr / local / sbin:/ usr / local / bin:/ usr / sbin:/ usr / bin


解决方案

看起来像一个bug,请在这里打开一张票: https://github.com/wayneeseguin/rvm/issues






事实上,这是一个错误,需要修复它:

  rvm get head 
rvm gemset reset_env

您可以重复 reset_env 操作对于每个损坏的宝石:

  rvm ruby​​ @ gemset do rvm gemset reset_env 


I was running ruby 2.0.0-p247 on my Mac Mini Server (Mavericks 10.9.1). I read that there was a security vulnerability so I decided to upgrade to use the latest Ruby patch 2.0.0-p353. I did the following commands:

gem update --system (RubyGems 2.1.11)
rvm get stable (RVM 1.25.0)
rvm upgrade 2.0.0-p247 2.0.0-p353 (which should have moved my gemsets)

There is nothing in my system that I can find that references 2.0.0-p247 in rvm which is what I expected. When I go to ~/myuser/.rvm/environments there is no file 2.0.0-p247.

I am now attempting to start passenger. I had version 4.0.23 enterprise installed. I attempted to run rvmsudo passenger-install-apache2-module but got an error.

cd /Users/myuser/.rvm/gems/ruby-2.0.0-p353@mygemset/gems/passenger-enterprise-server-4.0.23
/Users/myuser/.rvm/wrappers/ruby-2.0.0-p353@ mygemset/rake apache2:clean apache2 RELEASE=yes
# /Users/myuser/.rvm/wrappers/ruby-2.0.0-p353@ mygemset/rake apache2:clean apache2 RELEASE=yes
ERROR: Missing RVM environment file: '/Users/myuser/.rvm/environments/ruby-2.0.0-p247@LightBeCorp_Rails4Ruby2'

Here are statements in my .bashrc file related to rvm if this will help.

[[ -s "$HOME/.rvm/scripts/rvm" ]]
PATH="$PATH:$HOME/.rvm/gems/ruby-1.9.3-p327@mygemset/bin:/.rvm/rubies/ruby-1.9.3-p327/bin/ruby:/.rvm/rubies/ruby-1.9.3-p448/bin/ruby:/.rvm/rubies/ruby-2.0.0-p353/bin/ruby:/usr/bin/psql:/usr/local:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"

I did a rvm list rubies command. ruby-2.0.0-p247 is not listed.

Any help would be appreciated. I will continue looking. I plan to post a link to this in the Phusion Passenger group.

UPDATE 12/21/2013 12:20 pm

I updated my .bashrc file to the following since I no longer use the other rubies in my Rails applications. I still get the error when I try to run rvmsudo passenger-install-apache2-module.

[[ -s "$HOME/.rvm/scripts/rvm" ]]
PATH="$PATH:$HOME/.rvm/rubies/ruby-2.0.0-p353/bin/ruby:/usr/bin/psql:/usr/local:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"

解决方案

looks like a bug, please open a ticket here: https://github.com/wayneeseguin/rvm/issues


Indeed this was a bug, to fix it run:

rvm get head
rvm gemset reset_env

you can repeat the reset_env operation for every gemset that is broken:

rvm ruby@gemset do rvm gemset reset_env

这篇关于错误:缺少RVM环境文件执行rvm upgrade命令后 - Passenger 4.0.23的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆