Ruby on Rails Wednesday, August 31, 2011

In development it recompiles with every reload. In production it only
compiles when the files change and serves up the cached version
otherwise.

Dieter Lunn
http://ubiety.ca

On Wed, Aug 31, 2011 at 1:12 PM, Josh <josh.m.sharpe@gmail.com> wrote:
> With the release of 3.1, it seems that things have drastically changed
> in the development workflow.
>
> With the asset pipeline enabled, and the likes of this in my layouts:
>
> = stylesheet_link_tag 'application', :debug => Rails.env.development?
> = javascript_include_tag 'application', :debug =>
> Rails.env.development?
>
> ...every single css, js and image gets re-compiled on every single
> request.  This takes forever.
>
> My dev log is mostly comprised of this:
>
> Started GET "/assets/jquery-ui-1.8.16.custom.css?body=1" for 127.0.0.1
> at 2011-08-31 14:04:04 -0400
> Served asset /jquery-ui-1.8.16.custom.css - 304 Not Modified (0ms)
>
> It seems to me that the dev rails server (both webrick, and
> passenger), is handling the request of every asset.  It didn't work
> this way in 3.0.x. While it clearly says 304 (0ms) I can attest that
> the overall time to process a page (and all its assets) is
> *significantly* longer.
>
> Here's my application.rb and development.rb - they're basically the
> 3.1 defaults.
>
> http://stackoverflow.com/questions/7248911/rails-3-1-force-development-assets-to-get-served-up-like-they-were-in-3-0-x
>
> So is there a solution here?  Even if I didn't have :debug => true in
> my javascript/stylesheet tag, the JS and CSS files would still have to
> be complied/generated as well as every image - which is still a
> significant regression.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment