On Sat, Jul 4, 2009 at 3:16 AM, Rajendra Bayana < [email protected]> wrote:
> > hi , i used the folllwing command to scaffold, > > G:\my\webblog>ruby script/generate scaffold webblog id:integer > title:string body > :text created_at:datetime > > after when i migrate with the follwing command > > rake db:migrate > > i got the error as > > (in G:/my/webblog) > == 1 CreateWebblogs: migrating > ================================================ > -- create_table(:webblogs) > rake aborted! > Mysql::Error: You have an error in your SQL syntax; check the manual > that corres > ponds to your MySQL server version for the right syntax to use near > '(11), `titl > e` varchar(255) DEFAULT NULL, `body` text DEFAULT NULL, `created_at` ' > at line 1 > : CREATE TABLE `webblogs` (`id` int(11) DEFAULT NULL auto_increment > PRIMARY KEY( > 11), `title` varchar(255) DEFAULT NULL, `body` text DEFAULT NULL, > `created_at` d > atetime DEFAULT NULL, `updated_at` datetime DEFAULT NULL) ENGINE=InnoDB > > (See full trace by running task with --trace) > > > i got this error, can anyone help me?? > what can i do ,pls suggest me. i am using mysql 5.2 and rails 2.0.2 and > ruby 1.8.6. > -- > Posted via http://www.ruby-forum.com/. > Rajendra, you might want to use a different field than 'id' because each model has a field 'id' be default for managing the records within its associated table. Please try doing the following: ruby script/generate scaffold webblog title:string description:text Good luck, -Conrad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

