Created
September 20, 2010 22:08
-
-
Save grobie/588736 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/phusion_passenger/utils.rb b/lib/phusion_passenger/utils.rb | |
index e9bc00e..792cc46 100644 | |
--- a/lib/phusion_passenger/utils.rb | |
+++ b/lib/phusion_passenger/utils.rb | |
@@ -226,6 +226,18 @@ protected | |
ENV["RACK_BASE_URI"] = base_uri | |
end | |
+ # load project specific rvm settings | |
+ if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm') && File.exists?(".rvmrc") | |
+ begin | |
+ rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME'])) | |
+ rvm_lib_path = File.join(rvm_path, 'lib') | |
+ $LOAD_PATH.unshift rvm_lib_path | |
+ require 'rvm' | |
+ RVM.use_from_path! Dir.pwd | |
+ rescue | |
+ end | |
+ end | |
+ | |
encoded_environment_variables = options["environment_variables"] | |
if encoded_environment_variables | |
env_vars_string = encoded_environment_variables.unpack("m").first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment