CSSEdit with Rails

June 19th, 2007

I love CSSEdit. It has to be one of the prettiest OS X programs out there, and it makes editing CSS a breeze.

The one thing that has annoyed me though has been using the override feature when developing with Rails. Rails likes to append an asset id on every CSS, JavaScript, and image file that it serves. If I have screen.css, Rails would embed it like screen.css?123456789. So every time I would reload the page in CSSEdit, the style sheet override would be broken, because the asset id would be different.

There is a fast and wonderfully simple solution. Just add this line in config/environments/development.rb:


ENV["RAILS_ASSET_ID"] = ""

Voila! No more asset id in development mode. No more broken overrides.

Credit: MacRabbit Blog


3 Responses to “CSSEdit with Rails”

  1. Robert Says:

    Nice! That is rather handy, thanks Ryan!

  2. Chuck B in PDX Says:

    Thanks!!!

  3. takeo Says:

    oh this rules, thanks for this. That’s been driving me crazy, but CSSEdit is so awesome I dealt with it.

Leave a Reply