Lorenz
Lorenz

Reputation: 90

Asset pipeline precompiled locally with Rails 3.2.9

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

Answers (2)

Lorenz
Lorenz

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

pungoyal
pungoyal

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

Related Questions