Hello...I''ve run into some behavior I didn''t expect with the asset pipeline, running rails 3.1.0 (released version). In my environments/production.rb I have: config.assets.compile = false config.assets.digest = true When I precompile my assets, all seems to work fine; it generates assets with digests in their name, and I can retrieve them with something like /assets/tvlogo1-0ac8bb18dbc4d72f65d626985535fd22.png When I retrieve the above, it''s served from apache. Somewhat unexpectedly, I can also successfully retrieve: /assets/tvlogo1.png There is no such file in the public/assets directory, but it successfully retrieves the file and serves it through rack/rails (I can see the request in the production.log file). Is this expected behavior? It''s convenient, in that I can use my application.css from, say, static HTML files like my 404.html and 500.html pages, but I didn''t expect it to work given that I have config.assets.compile=false. Thanks, Greg -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Perhaps I could restate this question more simply. If the asset pipeline is in digest mode (in production), is it expected behavior that it should also serve assets _without_ digests in their filenames? -GR On Sep 5, 2011, at 2:34 PM, gr2020 wrote:> Hello...I''ve run into some behavior I didn''t expect with the asset > pipeline, running rails 3.1.0 (released version). > > In my environments/production.rb I have: > > config.assets.compile = false > config.assets.digest = true > > When I precompile my assets, all seems to work fine; it generates > assets with digests in their name, and I can retrieve them with > something like > > /assets/tvlogo1-0ac8bb18dbc4d72f65d626985535fd22.png > > When I retrieve the above, it''s served from apache. > > Somewhat unexpectedly, I can also successfully retrieve: > > /assets/tvlogo1.png > > There is no such file in the public/assets directory, but it > successfully retrieves the file and serves it through rack/rails (I > can see the request in the production.log file). > > Is this expected behavior? > > It''s convenient, in that I can use my application.css from, say, > static HTML files like my 404.html and 500.html pages, but I didn''t > expect it to work given that I have config.assets.compile=false. > > Thanks, > > Greg > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Following up some more on my own question...looks like someone added a pull request today that directly addresses this. Will keep an eye on it, though...if this gets "fixed", I think it will complicate things like a 404.html page that uses the application css file. https://github.com/rails/rails/pull/2886 On Sep 6, 9:10 am, Greg Reinacker <gr2...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Perhaps I could restate this question more simply. > > If the asset pipeline is in digest mode (in production), is it expected behavior that it should also serve assets _without_ digests in their filenames? > > -GR > > On Sep 5, 2011, at 2:34 PM, gr2020 wrote: > > > > > > > > > Hello...I''ve run into some behavior I didn''t expect with the asset > > pipeline, running rails 3.1.0 (released version). > > > In my environments/production.rb I have: > > > config.assets.compile = false > > config.assets.digest = true > > > When I precompile my assets, all seems to work fine; it generates > > assets with digests in their name, and I can retrieve them with > > something like > > > /assets/tvlogo1-0ac8bb18dbc4d72f65d626985535fd22.png > > > When I retrieve the above, it''s served from apache. > > > Somewhat unexpectedly, I can also successfully retrieve: > > > /assets/tvlogo1.png > > > There is no such file in the public/assets directory, but it > > successfully retrieves the file and serves it through rack/rails (I > > can see the request in the production.log file). > > > Is this expected behavior? > > > It''s convenient, in that I can use my application.css from, say, > > static HTML files like my 404.html and 500.html pages, but I didn''t > > expect it to work given that I have config.assets.compile=false. > > > Thanks, > > > Greg > > > -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > For more options, visit this group athttp://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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.