How to check asset pipeline is working properly without deploying

1k views Asked by At

Is it possible to check that asset pipeline related code and configuration is working without deploying?

Deploying to the testing server takes a couple of minutes, which is time I'd rather not waste.

Should I just run the application in production mode, or keep it in development mode and change asset pipeline related configuration?

Are there any risks that it will mess things up when running the application in development mode in the future?

I'm running on Rails 4.1.

1

There are 1 answers

0
bitsapien On

It shouldn't mess up things.

You can safely run RAILS_ENV=development rake assets:precompile to test things.

Do remember to do the following changes before you run the above :

  • Set config.assets.debug = false in your development.rb file. This will tell Sprockets to concatenate and run the necessary preprocessors on all assets.
  • Ensure config.assets.digest is set to true
  • Set Rails.application.config.assets.precompile += %w( search.js ) in config/initializers/assets.rb if you have additional assets that aren’t already referenced in your application.js or application.css.