On Sun, Jan 29, 2012 at 7:30 PM, Pascal Friederich <pau...@googlemail.com>wrote:
> I migrated one of my projects to from Rails 3.0 to 3.2.1 which means > I'm using the asset pipeline for the first time. > As much as I like the ease of compressing and minifying my assets the > more I'm annoyed about its behavior to raise an > AssetNotPrecompiledError as soon as, well, there's an asset that's not > precompiled. > > Can somebody explain me the reason why this is considered to be a good > idea? > For something as trivial as a missing image file the app fails > completely instead of just falling back to "old style" image_tag > behavior (images/foo.png vs assets/foo.png) and maybe produce an error > log line. Even a missing js or css file > isn't necessarily a showstopper. At least the app would still be > usable for a user until the "problem" gets fixed. > > I just cant see the benefit of this new behavior. > > What am I missing out here? > Maybe this option can help you: # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false from http://guides.rubyonrails.org/asset_pipeline.html . It's off (false) by default, but if you wanted you could turn it on. In that case, you probably need to make this group in your Gemfile # Gems used only for assets and not required # in production environments by default. group :assets do gem 'sass-rails' gem 'coffee-rails' gem 'uglifier' gem 'bootstrap-sass' end also available in production (which would mean to put it outside of the :assets group). HTH, Peter -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.