Skip to content
This repository

Fix finding bundler #894

wants to merge 1 commit into from

2 participants

Michal Papis Chris Eppstein
Michal Papis
mpapis commented May 16, 2012

it's related to this SO answer:

I was talking to @wycats and there are two possible solutions:

1) detect if Gemfile is in effect - this pull request:

if defined?(Bundler)
  require 'bundler/shared_helpers'
  Bundler.require :assets if Bundler::SharedHelpers.in_bundle?

2) detect if Bundlr.setup was called:

if defined?(Bundler) && Bundler.instance_variable_defined?("@setup")
  Bundler.require :assets
Chris Eppstein

merged as a368a57

Chris Eppstein chriseppstein closed this May 28, 2012
Chris Eppstein

Thanks for the patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 17, 2012
Michal Papis require assets only if Gemfile found 8d5e3d9
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  bin/compass
3  bin/compass
@@ -22,7 +22,8 @@ fallback_load_path(File.join(File.dirname(__FILE__), '..', 'lib')) do
22 22
23 23
24 24
 if defined?(Bundler)
-  Bundler.require :assets
+  require 'bundler/shared_helpers'
+  Bundler.require :assets if Bundler::SharedHelpers.in_bundle?
26 27
27 28
28 29
 runner = do

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.