rails new my-appby default it uses prototype as javascript framework. Now prototype isn't the best solution for all developers so you might want to use jQuery instead.
To use jQuery you need to create a new rails application with the following command instead:
rails new my-app -Jnotice the "-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 public/javascripts folder of your application.
Now download the file rails.js from http://github.com/rails/jquery-ujs and put it inside the public/javascripts folder too.
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:<%= stylesheet_link_tag 'jquery-ui-1.8.5', 'scaffold' %> <%= javascript_include_tag 'jquery-1.4.3', 'jquery-ui-1.8.5', 'application' %>You're done! Now you can use Ruby on Rails with jQuery.
Happy coding!