- Now, i had a problem about assets:precompile on production.
- When i run
bundle exec rake assets:precompile RAILS_ENV=production
. My website can't load javascript file and css file. But when i ran it on development environment, everything were well.
The problem was here if in
config/environments/production.rb
, and i set this line wastrue
same asconfig.assets.compile = true
. Everything was fine.- But when i set default same as
config.assets.compile = false
. My website can't load css file and javascript file. Hope everybody can explain for me ? Thank you very much.
Here is my application.css
vs application.js
/*
*= require_self
*= require_tree .
*/
This is my application.js file:
//= require jquery_ujs
//= require jquery-ui.min
//= require plugins/back-to-top
And this is application.html.erb
<%= stylesheet_link_tag 'application', media: 'all'%>
<%= javascript_include_tag "application" %>