diff options
author | elijah <elijah@riseup.net> | 2013-05-18 16:57:59 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-05-18 16:57:59 -0700 |
commit | 5d2e69ad4f2b6214df52c617f5e6cb23d9f40944 (patch) | |
tree | 71ec7a3ed03d17eb0c1f6be549d983ca0c3f5984 /bin | |
parent | 73eb4a54f734ce508aa57ebc27c54043e4da6125 (diff) |
set BUNDLE_GEMFILE env variable, if required.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/nickserver | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/nickserver b/bin/nickserver index f392efe..8843dde 100755 --- a/bin/nickserver +++ b/bin/nickserver @@ -11,9 +11,10 @@ def load_library(name) begin # try it as a gem require 'rubygems' require name - rescue LoadError # try manually + rescue LoadError # try manually, requiring gems in Gemfile if it exists. base_directory = File.expand_path('../..', File.symlink?(__FILE__) ? File.readlink(__FILE__) : __FILE__) if File.exists?("#{base_directory}/Gemfile.lock") + ENV['BUNDLE_GEMFILE'] ||= "#{base_directory}/Gemfile" require 'bundler' Bundler.require(:default) end |