I am using Ruby on Rails 3.0.10 and I am upgrading my RoR to the version 3.1.0. I am following the Upgrading to Rails 3.1 railscast and on the time 05:14 he deletes all related jQuery files present in the assets/javascripts/ directory.
In the linked railscast there are these 3 files:
jquery.js
jquery.min.js
rails.js
On my machine there are these 3 files:
jquery.js
jquery.min.js
jquery_ujs.js
The difference is that I have the jquery_ujs.js file instead of the rails.js file… what I have to do? That is, should I delete the jquery_ujs.js file?
Short answer is “yes”. Delete those files as they are no longer needed and will just conflict with the new built in ujs files.
If you, like me, used to use the jQuery-rails gem you should first delete the rails.js and jquery_ujs.js files. Then remove the
line from your development.rb file (I had to).
Change your application.js to look like this:
Then change your application.css to look like this:
That should take care of it.