Basically I''ve been creating various RoR (ruby on rails) applications and I cant figure out how to add properties to an already existing scaffold; I have ended up destroying and messing up two projects that I''ve worked hard on so far in trying to do this and realised I need some help trying to edit these. Please Help, Joe -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Don''t you just use the scaffold, as a bases, and the create the rest manual? What is your exact problem: What have you done? What are you missing/trying to do? Give concrete examples. /SG On Mar 21, 9:06 am, yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org wrote:> Basically I''ve been creating various RoR (ruby on rails) applications > and I cant figure out how to add properties to an already existing > scaffold; I have ended up destroying and messing up two projects that > I''ve worked hard on so far in trying to do this and realised I need > some help trying to edit these. > > Please Help, > > Joe-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 12:02 UTC
Re: Changing Scafflolds
For example if I created a forum with RoR and decided to have a forum, thread, and post scaffold, and they each has their own properties; Lets say the forum scaffold was made with these parameters "forum name:string number:integer". However if I wanted to add another property to the forum scaffold (for example if I wanted to add "password:string") how would I do this? At the moment I have something similar to this (well its different, but never the less uses scaffolds kind of like this) and I need to add a new property. Ive tried creating over the top of it with its already existing parameters plus the ones I want to add (for example "forum name:string number:integer password:string") however when I do this I then get this error when I attempt to migrate the database (categories is the scaffold I''m trying to add properties to): rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "image" varchar(255), "created_at" datetime, "updated_at" datetime) (See full trace by running task with --trace) I really need to be able to: 1)Get past this error. 2)Figure out how to add properties to scaffolds. Thanks In Advance, Joe On Mar 21, 11:53 am, gundestrup <gundest...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Don''t you just use the scaffold, as a bases, and the create the rest > manual? > > What is your exact problem: > What have you done? > What are you missing/trying to do? > > Give concrete examples. > > /SG > > On Mar 21, 9:06 am, yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org wrote: > > > Basically I''ve been creating various RoR (ruby on rails) applications > > and I cant figure out how to add properties to an already existing > > scaffold; I have ended up destroying and messing up two projects that > > I''ve worked hard on so far in trying to do this and realised I need > > some help trying to edit these. > > > Please Help, > > > Joe-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 21 March 2010 12:02, <youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote:> For example if I created a forum with RoR and decided to have a forum, > thread, and post scaffold, and they each has their own properties; > > rake aborted! > An error has occurred, this and all later migrations canceled: >You''ve got some terminology problems there, that are confusing things a little. What you''re calling "scaffolds" are really "migrations". "Scaffolding" is the combination of views, migrations, models and controllers that Rails can create for you to give you a bootstrap into a working application. By the sounds of it, you need to use "add_column" in your new migration. Have a look at some of the resources found through Google, or at p.71 of the "Agile Web Development With Rails" book. http://www.google.co.uk/search?q=rails+migration+add_column -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 13:11 UTC
Re: Changing Scafflolds
Aha, thanks! ill look into this (I really dont know any of the terminology, when I created the stuff I saw the word scaffold and assumed this was what to call it :P) If I have any further problems ill ask. Thanks, Joe On Mar 21, 1:02 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 21 March 2010 12:02, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > For example if I created a forum with RoR and decided to have a forum, > > thread, and post scaffold, and they each has their own properties; > > > rake aborted! > > An error has occurred, this and all later migrations canceled: > > You''ve got some terminology problems there, that are confusing things > a little. What you''re calling "scaffolds" are really "migrations". > > "Scaffolding" is the combination of views, migrations, models and > controllers that Rails can create for you to give you a bootstrap into > a working application. > > By the sounds of it, you need to use "add_column" in your new migration. > Have a look at some of the resources found through Google, or at p.71 > of the "Agile Web Development With Rails" book.http://www.google.co.uk/search?q=rails+migration+add_column-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 13:14 UTC
Re: Changing Scafflolds
Aha, thanks! ill look into this (I really dont know any of the terminology, when I created the stuff I saw the word scaffold and assumed this was what to call it :P) If I have any further problems ill ask. Thanks, Joe On Mar 21, 1:02 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 21 March 2010 12:02, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > For example if I created a forum with RoR and decided to have a forum, > > thread, and post scaffold, and they each has their own properties; > > > rake aborted! > > An error has occurred, this and all later migrations canceled: > > You''ve got some terminology problems there, that are confusing things > a little. What you''re calling "scaffolds" are really "migrations". > > "Scaffolding" is the combination of views, migrations, models and > controllers that Rails can create for you to give you a bootstrap into > a working application. > > By the sounds of it, you need to use "add_column" in your new migration. > Have a look at some of the resources found through Google, or at p.71 > of the "Agile Web Development With Rails" book.http://www.google.co.uk/search?q=rails+migration+add_column-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 13:17 UTC
Re: Changing Scafflolds
Ok, I seem to have a problem already. So first of all with these things, can I just change it in db/migrate/ WhateverFile.rb ? Then when I have changed it how do I put these changes into action? Also I cant seem to find how this could help me solve the error: rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "image" varchar(255), "created_at" datetime, "updated_at" datetime) (See full trace by running task with --trace) Although I assume it could in some way (since it has to do with the database, and rake etc).. Please Help, Thanks In Advance, Joe On Mar 21, 1:11 pm, yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org wrote:> Aha, thanks! ill look into this (I really dont know any of the > terminology, when I created the stuff I saw the word scaffold and > assumed this was what to call it :P) > > If I have any further problems ill ask. > > Thanks, > > Joe > > On Mar 21, 1:02 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 21 March 2010 12:02, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > > For example if I created a forum with RoR and decided to have a forum, > > > thread, and post scaffold, and they each has their own properties; > > > > rake aborted! > > > An error has occurred, this and all later migrations canceled: > > > You''ve got some terminology problems there, that are confusing things > > a little. What you''re calling "scaffolds" are really "migrations". > > > "Scaffolding" is the combination of views, migrations, models and > > controllers that Rails can create for you to give you a bootstrap into > > a working application. > > > By the sounds of it, you need to use "add_column" in your new migration. > > Have a look at some of the resources found through Google, or at p.71 > > of the "Agile Web Development With Rails" book.http://www.google.co.uk/search?q=rails+migration+add_column-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 13:17 UTC
Re: Changing Scafflolds
Ok, I seem to have a problem already. So first of all with these things, can I just change it in db/migrate/ WhateverFile.rb ? Then when I have changed it how do I put these changes into action? Also I cant seem to find how this could help me solve the error: rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "image" varchar(255), "created_at" datetime, "updated_at" datetime) (See full trace by running task with --trace) Although I assume it could in some way (since it has to do with the database, and rake etc).. Please Help, Thanks In Advance, Joe On Mar 21, 1:11 pm, yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org wrote:> Aha, thanks! ill look into this (I really dont know any of the > terminology, when I created the stuff I saw the word scaffold and > assumed this was what to call it :P) > > If I have any further problems ill ask. > > Thanks, > > Joe > > On Mar 21, 1:02 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 21 March 2010 12:02, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > > For example if I created a forum with RoR and decided to have a forum, > > > thread, and post scaffold, and they each has their own properties; > > > > rake aborted! > > > An error has occurred, this and all later migrations canceled: > > > You''ve got some terminology problems there, that are confusing things > > a little. What you''re calling "scaffolds" are really "migrations". > > > "Scaffolding" is the combination of views, migrations, models and > > controllers that Rails can create for you to give you a bootstrap into > > a working application. > > > By the sounds of it, you need to use "add_column" in your new migration. > > Have a look at some of the resources found through Google, or at p.71 > > of the "Agile Web Development With Rails" book.http://www.google.co.uk/search?q=rails+migration+add_column-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 13:37 UTC
Re: Changing Scafflolds
Ok, I seem to have a problem already. So first of all with these things, can I just change it in db/migrate/ WhateverFile.rb ? Then when I have changed it how do I put these changes into action? Also I cant seem to find how this could help me solve the error: rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "image" varchar(255), "created_at" datetime, "updated_at" datetime) (See full trace by running task with --trace) Although I assume it could in some way (since it has to do with the database, and rake etc).. Please Help, Thanks In Advance, Joe On Mar 21, 1:11 pm, yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org wrote:> Aha, thanks! ill look into this (I really dont know any of the > terminology, when I created the stuff I saw the word scaffold and > assumed this was what to call it :P) > > If I have any further problems ill ask. > > Thanks, > > Joe > > On Mar 21, 1:02 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 21 March 2010 12:02, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > > For example if I created a forum with RoR and decided to have a forum, > > > thread, and post scaffold, and they each has their own properties; > > > > rake aborted! > > > An error has occurred, this and all later migrations canceled: > > > You''ve got some terminology problems there, that are confusing things > > a little. What you''re calling "scaffolds" are really "migrations". > > > "Scaffolding" is the combination of views, migrations, models and > > controllers that Rails can create for you to give you a bootstrap into > > a working application. > > > By the sounds of it, you need to use "add_column" in your new migration. > > Have a look at some of the resources found through Google, or at p.71 > > of the "Agile Web Development With Rails" book.http://www.google.co.uk/search?q=rails+migration+add_column-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 13:40 UTC
Re: Changing Scafflolds
Ok, I seem to have a problem already. So first of all with these things, can I just change it in db/migrate/ WhateverFile.rb ? Then when I have changed it how do I put these changes into action? Also I cant seem to find how this could help me solve the error: rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "image" varchar(255), "created_at" datetime, "updated_at" datetime) (See full trace by running task with --trace) Although I assume it could in some way (since it has to do with the database, and rake etc).. Please Help, Thanks In Advance, Joe On Mar 21, 1:11 pm, yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org wrote:> Aha, thanks! ill look into this (I really dont know any of the > terminology, when I created the stuff I saw the word scaffold and > assumed this was what to call it :P) > > If I have any further problems ill ask. > > Thanks, > > Joe > > On Mar 21, 1:02 pm, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > On 21 March 2010 12:02, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > > For example if I created a forum with RoR and decided to have a forum, > > > thread, and post scaffold, and they each has their own properties; > > > > rake aborted! > > > An error has occurred, this and all later migrations canceled: > > > You''ve got some terminology problems there, that are confusing things > > a little. What you''re calling "scaffolds" are really "migrations". > > > "Scaffolding" is the combination of views, migrations, models and > > controllers that Rails can create for you to give you a bootstrap into > > a working application. > > > By the sounds of it, you need to use "add_column" in your new migration. > > Have a look at some of the resources found through Google, or at p.71 > > of the "Agile Web Development With Rails" book.http://www.google.co.uk/search?q=rails+migration+add_column-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 21 March 2010 13:40, <youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote:> Ok, I seem to have a problem already. > > So first of all with these things, can I just change it in db/migrate/ > WhateverFile.rb ? > Then when I have changed it how do I put these changes into action?I suggest you have a look at the rails guides at http://guides.rubyonrails.org/. Start with Getting Started, not surprisingly, then the next one is Database Migrations which should sort out your current problems. Then move on and work you way through the others. The ones on ActiveRecord Associations and Debugging are compulsory reading. Colin -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
And remember to use http://railscasts.com/ Great for getting started. /SG On Mar 21, 3:26 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 21 March 2010 13:40, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > Ok, I seem to have a problem already. > > > So first of all with these things, can I just change it in db/migrate/ > > WhateverFile.rb ? > > Then when I have changed it how do I put these changes into action? > > I suggest you have a look at the rails guides athttp://guides.rubyonrails.org/. Start with Getting Started, not > surprisingly, then the next one is Database Migrations which should > sort out your current problems. Then move on and work you way through > the others. > > The ones on ActiveRecord Associations and Debugging are compulsory reading. > > Colin-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 16:25 UTC
Re: Changing Scafflolds
Ok, So I figure I have to roll the database back and then migrate it again. However it just isnt doing anything when I call "rake db:rollback", or even specify a STEP:>rake db:rollback STEP=4(in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog)>rake db:rollback STEP=10(in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog)>rake db:migrate(in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog) == CreateCategories: migrating ==============================================-- create_table(:categories) rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "image" varchar(255), "created_at" datetime, "updated_at" datetime) (See full trace by running task with --trace) I just cant figure out why it wont rollback... Please Help, Thanks In Advance, Joe On Mar 21, 2:26 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 21 March 2010 13:40, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > Ok, I seem to have a problem already. > > > So first of all with these things, can I just change it in db/migrate/ > > WhateverFile.rb ? > > Then when I have changed it how do I put these changes into action? > > I suggest you have a look at the rails guides athttp://guides.rubyonrails.org/. Start with Getting Started, not > surprisingly, then the next one is Database Migrations which should > sort out your current problems. Then move on and work you way through > the others. > > The ones on ActiveRecord Associations and Debugging are compulsory reading. > > Colin-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 16:25 UTC
Re: Changing Scafflolds
Ok, So I figure I have to roll the database back and then migrate it again. However it just isnt doing anything when I call "rake db:rollback", or even specify a STEP:>rake db:rollback STEP=4(in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog)>rake db:rollback STEP=10(in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog)>rake db:migrate(in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog) == CreateCategories: migrating ==============================================-- create_table(:categories) rake aborted! An error has occurred, this and all later migrations canceled: SQLite3::SQLException: table "categories" already exists: CREATE TABLE "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar(255), "image" varchar(255), "created_at" datetime, "updated_at" datetime) (See full trace by running task with --trace) I just cant figure out why it wont rollback... Please Help, Thanks In Advance, Joe On Mar 21, 2:26 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 21 March 2010 13:40, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > Ok, I seem to have a problem already. > > > So first of all with these things, can I just change it in db/migrate/ > > WhateverFile.rb ? > > Then when I have changed it how do I put these changes into action? > > I suggest you have a look at the rails guides athttp://guides.rubyonrails.org/. Start with Getting Started, not > surprisingly, then the next one is Database Migrations which should > sort out your current problems. Then move on and work you way through > the others. > > The ones on ActiveRecord Associations and Debugging are compulsory reading. > > Colin-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
youtube-T/oTI28FLjDQXOPxS62xeg@public.gmane.org
2010-Mar-21 16:33 UTC
Re: Changing Scafflolds
NEVER MIND. I was being an idiot. I just deleted the old migration file that was causing the problems; and then created a new migration file to get the new stuff in.. Thanks Guys, -Joe On Mar 21, 4:25 pm, yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org wrote:> Ok, So I figure I have to roll the database back and then migrate it > again. > > However it just isnt doing anything when I call "rake db:rollback", or > even specify a STEP: > > >rake db:rollback STEP=4 > > (in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog)>rake db:rollback STEP=10 > > (in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog)>rake db:migrate > > (in C:/Users/user/Documents/Aptana Studio Workspace/ProductCatalog) > == CreateCategories: migrating > ==============================================> -- create_table(:categories) > rake aborted! > An error has occurred, this and all later migrations canceled: > > SQLite3::SQLException: table "categories" already exists: CREATE TABLE > "categories" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" > varchar(255), "image" varchar(255), "created_at" datetime, > "updated_at" datetime) > > (See full trace by running task with --trace) > > I just cant figure out why it wont rollback... > > Please Help, > > Thanks In Advance, > > Joe > > On Mar 21, 2:26 pm, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > On 21 March 2010 13:40, <yout...-T/oTI28FLjDQXOPxS62xeg@public.gmane.org> wrote: > > > > Ok, I seem to have a problem already. > > > > So first of all with these things, can I just change it in db/migrate/ > > > WhateverFile.rb ? > > > Then when I have changed it how do I put these changes into action? > > > I suggest you have a look at the rails guides athttp://guides.rubyonrails.org/. Start with Getting Started, not > > surprisingly, then the next one is Database Migrations which should > > sort out your current problems. Then move on and work you way through > > the others. > > > The ones on ActiveRecord Associations and Debugging are compulsory reading. > > > Colin-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.