Permalink
Browse files

Update config/setup_load_paths.rb

  • Loading branch information...
1 parent 98eabd1 commit 723ebc0a7e6099f3379c89523b364ebbe7093604 @powerchurch powerchurch committed Nov 14, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 config/setup_load_paths.rb
View
9 config/setup_load_paths.rb
@@ -1,13 +1,12 @@
+#per https://rvm.io/integration/passenger/
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
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
+ gems_path = ENV['MY_RUBY_HOME'].split(/@/)[0].sub(/rubies/,'gems')
+ ENV['GEM_PATH'] = "#{gems_path}:#{gems_path}@global"
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."
+ raise "RVM gem is currently unavailable."
end
end

0 comments on commit 723ebc0

Please sign in to comment.