Reputation: 90
I'm using Rails 3.2.9 and I precompiled my asset pipeline locally before the application deploy (with Capistrano) and it works good. I used:
bundle exec rake assets:precompile
In "config" directory I only modified deploy.rb
and production.rb
. Now, in development mode, when I put new code in /app/assets/javascripts/application.js
I can't see changes in my application.
For example, I use jQuery multiselect in this way:
$("#question_number").multiselect({
multiple: false,
header: false,
show: "blind",
hide: "blind",
minWidth: "200",
selectedList: 1
});
Before precompilation, the select change graphic, but now remain a classic html select. I think that the problem is the precompilation, because I took source code precompilation and a new jQuery
multiselect works. I tried to do a new precompilation, but nothing change.
Upvotes: 2
Views: 159
Reputation: 90
Command rake assets:clean
works good, thanks so much Puneet.
In the future, pay more attention to change nothing into asset pipeline files, such as application.js.
For me, only a change gave problems.
Upvotes: 0
Reputation: 1798
Run rake assets:clean
, clean your browser cache and reload the page. That should solve the problem for you.
Also, look at: Rails won't load asset pipeline for more details.
Upvotes: 1