Hi there, I'm running into some trouble generating CSS files from SASS
files under Rails 3.0.4 with Ruby 1.9.2.

On the initial request the CSS file is generated but AFTER the
response has been returned to the browser. If the SASS file changes
the CSS file never gets updated.

The steps to reproduce this issue are:

$ rails new test
$ cd test
$ echo "gem 'haml'" >> Gemfile
$ bundle
$ mkdir public/stylesheets/sass
$ echo "body { background: #FF0000 }" > public/stylesheets/sass/
styles.scss
$ rails s
=> Booting
WEBrick
=> Rails 3.0.4 application starting in development on http://0.0.0.0:3000
=> Call with -d to
detach
=> Ctrl-C to shutdown
server
[2011-03-04 14:40:45] INFO  WEBrick
1.3.1
[2011-03-04 14:40:45] INFO  ruby 1.9.2 (2010-12-25) [x86_64-
darwin10.6.0]
[2011-03-04 14:40:45] INFO  WEBrick::HTTPServer#start: pid=8513
port=3000


Started GET "/stylesheets/styles.css" for 127.0.0.1 at 2011-03-04
14:40:54 -0800

ActionController::RoutingError (No route matches "/stylesheets/
styles.css"):

In another terminal request the CSS file:

$ curl -D - http://localhost:3000/stylesheets/styles.css
HTTP/1.1 404 Not Found
Content-Type: text/html
Content-Length: 643
X-Runtime: 0.609217
Server: WEBrick/1.3.1 (Ruby/1.9.2/2010-12-25)
Date: Fri, 04 Mar 2011 22:40:55 GMT
Connection: Keep-Alive

Notice how the file wasn't found. As one can see in the server log
above, ActionController reported a RoutingError.

Yet on the 2nd request it IS there:

$ curl -D - http://localhost:3000/stylesheets/styles.css
HTTP/1.1 200 OK
Last-Modified: Fri, 04 Mar 2011 22:40:55 GMT
Content-Type: text/css
Content-Length: 77
Server: WEBrick/1.3.1 (Ruby/1.9.2/2010-12-25)
Date: Fri, 04 Mar 2011 22:41:55 GMT
Connection: Keep-Alive

body {
  background: #FF0000; }

Did I miss anything? Seems like a bug to me.

=bartt

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to