Skip to content
This repository

Fix finding bundler #894

Closed
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: http://stackoverflow.com/questions/10610254/cant-install-compass-via-rvm/10611366#10611366

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?
end

2) detect if Bundlr.setup was called:

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

merged as a368a57

Chris Eppstein chriseppstein closed this May 28, 2012
Chris Eppstein
Owner

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
 end
23 23
 
24 24
 if defined?(Bundler)
25  
-  Bundler.require :assets
  25
+  require 'bundler/shared_helpers'
  26
+  Bundler.require :assets if Bundler::SharedHelpers.in_bundle?
26 27
 end
27 28
 
28 29
 runner = Proc.new do
Commit_comment_tip

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.