I'm a beginner in rails (ruby as well)and i'm using a book to help me learn about rails (HF rails).Let's start with my spec : -i'm using radrails v.2 in aptana studio -ruby ver. 1.8.7 && ruby gems 1.3.7,with rails 2.3.4,mysql 5.1.41 and a mongrel server 1.1.5 In my controller i have the existing code :
class AdsController < ApplicationController def show @ad = Ad.find (params[ :id ]) end
end
my route.rb has also : ActionController::Routing::Routes.draw do |map| map.connect '/ads/:id' ,:controller=> 'ads',:action=>'show' map.connect ':controller/:action/:id' map.connect ':controller/:action/:id.:format' end
When i try to run the explorer i get the following error message (see attached file).I also want to add that i cant use the generate model or scaffold command properly,when i create the table command
e.g. ruby script/generate model ad name : string ,
it doesnt make a file in the migrate folder only a empty ad.rb model without any code with a comment " wrong number of arguments (1 for 2) wrong",i dont know if it is related. So i was wondering if it's a problem with aptana studio or the code from the book i used .Any usefull advice will be much appreciated.
Attachments: http://www.ruby-forum.com/attachment/5363/errorcode.txt