Skip to content

Instantly share code, notes, and snippets.

@endorama
Created September 4, 2013 16:36
Show Gist options
  • Save endorama/6439524 to your computer and use it in GitHub Desktop.
Save endorama/6439524 to your computer and use it in GitHub Desktop.
Update RVM loading for Passenger 4, Rails 3 and newer RVM versions ( >= 1.20.11 ). Reference here: http://joncairns.com/2013/06/using-project-specific-gemsets-with-rails-rvm-and-passenger/
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
begin
require 'rvm'
RVM.use_from_path! File.dirname(File.dirname(__FILE__))
rescue LoadError
# RVM is unavailable at this point.
raise "RVM ruby lib is currently unavailable."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment