@Philip:
It depends on what you need:
1) Do you need to be able to alter the sass files on production, and
have compass compile the result automatically on page view ?
If yes, you'll need to add compass to the Gemfile, and you'll have to
use the "init rails" method:
> compass init rails -u blueprint/semantic
Now, your rails app knows about compass, and if you change your sass
files, the css will be updated automatically on the next http request.
It will work as well in development as in production.
The problem I had with this approach, is that it was then difficult to
switch refinery themes.
When you init compass for rails, it generates a compass.rb file under
the app's config directory.
Inside this file, paths are defined:
css_dir = "public/stylesheets/compiled"
sass_dir = "app/stylesheets"
If you want to be able to use it with the ability to switch refinery
themes, you'll have to do something like:
css_dir = "themes/" + RefinerySetting.find_by_name('theme') + "/css"
sass_dir = "themes/" + RefinerySetting.find_by_name('theme') + "/
sass"
I have not tested this approach, beacause I don't need to compile sass
files in production, and because I'm using Heroku, which is read-only.
So I took the simpler approach:
2) If you don't need to alter sass files on production, then there is
no need to have compass installed on production, so no need to add
compass to the Gemfile.
Here is my workflow:
> cd themes
> compass create mytheme -u blueprint/semantic
> cd mytheme
> compass watch
This will auto-compile the sass files during develoment, even if my
rails app knows nothing about compass.
When I want to deploy to production, as I use git, I just make sure
the compiled css files are checked in. Then I deploy as usual with a
git push.
In this approach, compass is just used as a tool to author stylesheets
during development. It feel more logical to me, for most situations.
You can easily create several, switchable themes without even touching
your app's config or Gemfile.
Daniel