Top "Sprockets" questions

Sprockets is a Ruby library that preprocesses and concatenates JavaScript and CSS source files.

Using Rails 3.1, where do you put your "page specific" JavaScript code?

To my understanding, all of your JavaScript gets merged into 1 file. Rails does this by default when it adds //= require_…

javascript ruby-on-rails ruby-on-rails-3.1 asset-pipeline sprockets
How can I disable logging of asset pipeline (sprockets) messages in Ruby on Rails 3.1?

Sprockets tends to be quite verbose in the (dev) log by default under Ruby on Rails 3.1 (RC1): Started GET "/assets/…

ruby-on-rails ruby-on-rails-3 asset-pipeline sprockets rails-sprockets
Using Rails 3.1 assets pipeline to conditionally use certain css

I’m in the process of building my first solo Rails app using Rails 3.1.rc5. My problem is that I …

css ruby-on-rails-3.1 asset-pipeline sprockets
How do I use reference images in Sass when using Rails 3.1?

I have a Rails 3.1 project with the asset pipeline working great. The problem is that I need to reference images …

ruby-on-rails css ruby-on-rails-3 sass sprockets
Rails config.assets.precompile setting to process all CSS and JS files in app/assets

I wish to precompile all the CSS and JS files in my project's app/assets folder. I do NOT want …

ruby-on-rails ruby-on-rails-3 sprockets
Access Asset Path from Rails Controller

I'm sharing a configuration yml file client side, that I need to also load on the server side, I've placed …

ruby-on-rails ruby-on-rails-3.1 sprockets
Rails 3.1 asset pipeline: how to load controller-specific scripts?

If I generate a new controller in Rails 3.1, also a javascript file with the name of the controller will added …

ruby-on-rails ruby-on-rails-3.1 asset-pipeline assets sprockets
Rails 3.1 asset pipeline and manually ordered Javascript requires

I am trying to convert an existing app to the new 3.1 asset pipeline layout, and want to include a lot …

ruby-on-rails-3 asset-pipeline sprockets
What does require_self mean?

In rails3.1 application.css we could see /* *= require_self *= require_tree . */ I know that require_tree . is just telling the …

ruby-on-rails-3.1 sprockets
After gem update: test fail with "Asset was not declared to be precompiled in production"

Since I updated several gems all tests fail with the error: ActionView::Template::Error: Asset was not declared to be …

ruby-on-rails ruby asset-pipeline sprockets