Permalink
Browse files

Changed load_path append to unshift.

  • Loading branch information...
1 parent 16bd3fe commit 7e9ce21402f8c83c7eebdf9e033a14e9f08afc3c @treeder treeder committed Jan 6, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/iron_worker/service.rb
@@ -182,12 +182,12 @@ def build_merged_file(filename, merged, unmerge, merged_gems, merged_mailers, me
#require gems dependencies
gems_dependencies.each_pair do |k, gem|
IronWorker.logger.debug "Bundling gem #{gem[:name]}..."
- f.write "$LOAD_PATH << File.join(File.dirname(__FILE__), '/gems/#{gem[:name]}/lib')\n"
+ f.write "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/gems/#{gem[:name]}/lib'))\n"
end
# require merged gems
merged_gems.each_pair do |k, gem|
IronWorker.logger.debug "Bundling gem #{gem[:name]}..."
- f.write "$LOAD_PATH << File.join(File.dirname(__FILE__), '/gems/#{gem[:name]}/lib')\n"
+ f.write "$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '/gems/#{gem[:name]}/lib'))\n"
IronWorker.logger.debug 'writing requires: ' + gem[:require].inspect
if gem[:require].nil?
gem[:require] = []

0 comments on commit 7e9ce21

Please sign in to comment.