Browse files

Use absolute paths for Gemfile includes

The supplementary Gemfiles located in the application's root were
causing bundler to fail if bundle commands were run from a different
directory, for example a subdirectory or if referencing the binaries
elsewhere. This just finds those files based on the Gemfile's own
  • Loading branch information...
mikldt committed Dec 20, 2012
1 parent 3f297e2 commit 2198277929b81d049000242529da080be38570d7
Showing with 11 additions and 2 deletions.
  1. +11 −2 Gemfile
13 Gemfile
@@ -3,11 +3,20 @@ source ''
gem "rails", "3.2.9"
+# Get the absolute path of this Gemfile so the includes below still work
+# when the current directory for a bundler command isn't the application's
+# root directory.
+basedir = File.dirname(__FILE__)
# Load the gems used for remote reporting.
-eval'Gemfile-reporting') if File.exists?('Gemfile-reporting')
+if File.exists?(basedir+'/Gemfile-reporting')
+ eval'/Gemfile-reporting')
+# The Gemfile-plugins gem list is managed by Concerto itself,
+# through the ConcertoPlugins controller.
group :concerto_plugins do
- eval'Gemfile-plugins')
+ eval'/Gemfile-plugins')
# Gems used only for assets and not required

0 comments on commit 2198277

Please sign in to comment.