Skip to content

Instantly share code, notes, and snippets.

@variousauthors
Last active December 20, 2015 13:49
Show Gist options
  • Save variousauthors/6142170 to your computer and use it in GitHub Desktop.
Save variousauthors/6142170 to your computer and use it in GitHub Desktop.
If you don't understand Japanese but still want to use Foundation 4 with Rails 4, check it out!

#Using compass-rails with rails 4

If you try to use compass-rails with rails 4, the following error will stop you,

Unsupported rails environment for compass

You can fix this error by doing the following:

$ vim Gemfile
gem 'compass-rails', github: "milgner/compass-rails", branch: "rails4"

If the sprite images you generated with compass aren't being included, try this:

$ vim application.css.sass
@import "layout/*.png";
@include all-layout-sprites;

$ vim config/application.rb
config.compass.images_dir = '/app/assets/images'

With that, you should be able to precompile your assets!

For more details:

Compass/compass-rails#59

@variousauthors
Copy link
Author

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