Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

README improvements #41

Closed
wants to merge 1 commit into from

4 participants

@spacekat

Adds information on how to customize the sprite generation directory in Rails 3.1+ (asset pipeline) to the README

@mark-rushakoff

+1 on this. It took me an hour of trying to figure this out before I found this pull request, containing the solution to my problem.

@scottdavis
Owner

you should actually set the sprite_load_path if you are using this with sprites

Sprite Load Path: Sprite source files can now be stored in more locations than just your images directory. To add sprite locations in your compass configuration: `sprite_load_path << 'my/sprite/folder'

@philipwalton

I don't think this is correct. app/assets/images/sprites is already in the asset path by default.

@scottdavis scottdavis closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Apr 26, 2012
  1. Adds information on how to customize the sprites directory with the R…

    spacekat authored
    …ails asset pipeline to the README
This page is out of date. Refresh to see the latest.
Showing with 11 additions and 0 deletions.
  1. +11 −0 README.md
View
11 README.md
@@ -144,6 +144,17 @@ Instead use the sass `@import` directive. In rails projects, the
There was a bug in rails 3.1.0 -- please make sure you are running 3.1.1
at the earliest for this version of rails.
+If you want to exclude the generated sprites from Git, you will want to generated them in a directory that can be ignored. Do so by customizing the ``generated_images_dir`` in your application.rb. (Example)
+
+```ruby
+config.compass.generated_images_dir = 'app/assets/images/sprites'
+```
+Following that, make sure to add the sprites directory to your ``assets.paths`` so the sprites are accessible via HTTP (Example)
+
+```ruby
+config.assets.paths << Rails.root.join("app", "assets", "images", "sprites")
+```
+
## Rails 3.0 Caveats
If you want rails to compile your stylesheets (instead of using the
Something went wrong with that request. Please try again.