Skip to content

Commit

Permalink
Raise error if rails is not required before compass
Browse files Browse the repository at this point in the history
  • Loading branch information
josepjaume committed Feb 2, 2012
1 parent 252e6b2 commit d84322c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/compass-rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ def rails_loaded?
end

def rails_version
(Gem.loaded_specs["railties"] || Gem.loaded_specs["rails"]).version.to_s
rails_spec = (Gem.loaded_specs["railties"] || Gem.loaded_specs["rails"])
raise "You have to require Rails before compass" unless rails_spec
rails_spec.version.to_s
end

def rails3?
Expand Down

0 comments on commit d84322c

Please sign in to comment.