Rails uses older version of jquery
I just upgraded my Rails 3 app to 3.1. My jquery-rails gem's version is 1.0.11, the up to date one, yet when I check out the application.js, the file that "//= require jquery", it still shows that the jquery used is stuck at 1.5. Does anyone have an idea 开发者_Go百科to why this is?
Thank you.
You have a older version of the actual jQuery files.
Run rails generate jquery:install
and it should download the latest.
Have the same issue but that didn't work. Running
rails generate jquery:install
is deprecated if you are running 3.1
You are using Rails 3.1 with the asset pipeline enabled, so this generator is not needed. The necessary files are already in your asset pipeline. Just add
//= require jquery
and//= require jquery_ujs
to your app/assets/javascripts/application.js If you upgraded your app from Rails 3.0 and still have jquery.js, rails.js, or jquery_ujs.js in your javascripts, be sure to remove them
I really can't see where jquery 1.5 is coming from. My public/ has no js files And have jquery-rails (1.0.19) installed (inspecting the gem folder one finds jquery 1.8!)
Cheers,
精彩评论