Jump to content

The ultimate community for Ruby on Rails developers.


Photo

precompile asset PROD vs DEV


  • Please log in to reply
2 replies to this topic

#1 lnthai2002

lnthai2002

    Passenger

  • Members
  • 2 posts

Posted 04 December 2013 - 04:20 AM

Hi,

Does anyone know the difference between these 2 :

bundle exec rake assets:precompile

and 

RAILS_ENV=production bundle exec rake assets:precompile

By specifying RAILS_ENV=production, i see a significant larger number of assets written to the public folder. Also, i can successfully precompile bootstrap-sass with the first command but fail in the 2nd command. Hope someone can enlighten me on this.



#2 Bharat Soni

Bharat Soni

    Dispatcher

  • Members
  • 53 posts
  • LocationAhmedabad

Posted 04 December 2013 - 05:16 AM

You can try this......

rake assets:precompile RAILS_ENV=production

Fun with Ruby on Rails


#3 lnthai2002

lnthai2002

    Passenger

  • Members
  • 2 posts

Posted 04 December 2013 - 04:42 PM

The notable difference between my development.rb and production.rb is that i have the following line in production.rb

config.assets.precompile += ["*.css", "*.js"]

This seem to be the cause for lot of files being compile (all js files in jquery-ui packages are recompile individually)

I see people list each asset individual here, is there any reason why i should not use *.css ?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users