Dominik Menke
2011-Sep-04 21:15 UTC
Linking failure in stylesheet_link_tag in production mode with asset pipeline enabled
Hey, in my `application.html.erb`, I have this line: <%= stylesheet_link_tag ''application'' %> which should compile through the asset pipeline and link to the application.css (which does a `require_tree .`). In development mode, I''d expect a <link ... href="/assets/application.css" /> This file is actually delivered by, for example, the thin webserver. When starting thin in production mode (even after `rake assets:precompile`), the `application.css` is still link''ed – here I''d expect the `/assets/application-md5hash.css` which is generated in the public directory. Even further: in the SCSS files, the `image_url` helper does not resolve the correct paths (cp. http://rdoc.info/gems/sass-rails/3.1.0/Sass/Rails/Helpers), background: image_url(''foo.png''); compiles to background: url(/assets/foo.png); instead of background: url(/assets/foo-md5hash.png); Or am I just missing something!? —Dominik -- 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.
Dominik Menke
2011-Sep-05 07:40 UTC
Re: Linking failure in stylesheet_link_tag in production mode with asset pipeline enabled
Got it. In my config/enviroments/production.rb, the following lines were missing: config.assets.compress = true config.assets.compile = true config.assets.digest = true I actually was upgrading a 3.0 application and obviously missed some configs. Sorry for the noise! (coincidentally, today''s Railscast covers this issue – http://railscasts.com/episodes/282-upgrading-to-rails-3-1) —Dominik -- 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.