Skip to content

Commit

Permalink
Configure bundler for multi-app server
Browse files Browse the repository at this point in the history
  • Loading branch information
veezus committed Jul 15, 2011
1 parent b4fa904 commit 2b364ee
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions config/setup_load_paths.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
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
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

ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'

0 comments on commit 2b364ee

Please sign in to comment.