Cómo definir la versión de jquery con rails asset pipeline

I use Rails 3.1 with asset-pipeline and I would like to use a specific version of JQuery.

For example for my project JQuery 1.6.2 is added by default but I would like to use JQuery 1.7.1

Can I specified it in my application.js? Or it's something to configure in my Gemfile (jquery-rails gem for example, my version is 1.0.14)?

Muchas Gracias

preguntado el 09 de marzo de 12 a las 15:03

1 Respuestas

Seems the gem was updated

Edit: version 1.0.19 uses jquery 1.7, update your gem

Si no es así, intente esto:

gem environment

Navigate to your gem path and look for somthing like gems/jquery-rails-1.0.14/vendor/assets/javascripts y reemplazar jquery.min.js y jquery.js with jquery 1.7 code.

respondido 09 mar '12, 16:03

Indeed the gem was updated. Yet I'm not really satisfied because the current version of JQuery is 1.7.1 and the gem add 1.7.0 And In the future if I want to downgrade to 1.6.2 I will need to downgrade my gem? - CupraR_On_Rails

Manually update the gem as described above to get jquery 1.7.1 - Kyle

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.