Once you have some idea then you can go ahead with this. http://railstutorial.org
In addition, watch the webcasts
http://railscasts.org