ERROR: Missing RVM environment file After Doing rvm upgrade command - Passenger 4.0.23

前端 未结 2 820
执念已碎
执念已碎 2021-01-25 11:08

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.

相关标签:
2条回答
  • 2021-01-25 11:28

    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
    
    0 讨论(0)
  • 2021-01-25 11:31

    There might be a cached bin file in your RVM path. In my case, it's "/usr/local/rvm/bin/unicorn"

    Also, you may not directly having the gem in your Gemfile. In my case, I do not have "unicorn" in my Gemfile although I had "capistrano-unicorn".

    So that the system will try to use the global cached file "/usr/local/rvm/bin/unicorn".

    The file's content may using a ruby that you no longer use.

    if [[ -s "/usr/local/rvm/environments/ruby-2.0.0-p247" ]]
    then
      source "/usr/local/rvm/environments/ruby-2.0.0-p247"
      exec unicorn "$@"
    else
      echo "ERROR: Missing RVM environment file: '/usr/local/rvm/environments/ruby-2.0.0-p247'" >&2
      exit 1
    fi
    
    0 讨论(0)
提交回复
热议问题