Ruby on Rails is an open source web application framework for the Ruby programming language. The last version of this framework is the 3.0.0 released Aug 29, 2010. By default, when you start a new Rails application with
To use jQuery you need to create a new rails application with the following command instead:
-J option that skips the creation of the prototype files in the new app.
Now you have to download jQuery from its website and put the
jquery-x.x.x.js file inside the
Download the file
rails.js from github and put it inside the
Now you need to add a reference to jQuery inside the application layout. To do so, open the file
app/views/layouts/application.html.erb and add the following code:
You’re done! Now you can use Ruby on Rails with jQuery.