I am running a rails 3.1 app which uses an engine called 'awesome_engine'. Awesome_engine has some asset stuff I need to get at but compass's load paths do not include the engines assets path. My understanding is that it should be there, but it's not.
I need to add it so I modified my config/compass.rb to include compass's additional_import_paths config setting. The problem is, this is how I get the path to the required gem:
begin
gem_root = $LOAD_PATH.find{|i| i.include?('/awesome_engine/')}.gsub(/awesome_engine\/.*/, 'awesome_engine/app/assets/stylesheets/scss')
additional_import_paths = [gem_root]
rescue
end
This works but there has got to be an easier/better/cleaner way to get a gem's full path. Anyone?