I am beginner for this Rails from the past 2 days I am working hard to fix the following error C:\Murali Rubby\demo\library>rake db:migrate (in C:/Murali Rubby/demo/library) == CreateBooks: migrating ===================================================-- create_table(:books) rake aborted! An error has occurred, all later migrations canceled: Mysql::Error: Table ''books'' already exists: CREATE TABLE `books` (`id` int(11) D EFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, `updated_at` date time) ENGINE=InnoDB (See full trace by running task with --trace) I spend almost like 20 hrs but I didn''t find the way to fix it. I am working on the example given in the tutorialpoint website... Please help me ... Thanks in advance for your time. -- 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.
Hi, Can you just check once again that you don''t have two migration files creating books table? If not then you can choose books tables manually. Thanks, --Haribhau On Sat, May 29, 2010 at 3:24 AM, DVM <krish1253-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am beginner for this Rails from the past 2 days I am working hard > to fix the following error > > C:\Murali Rubby\demo\library>rake db:migrate > (in C:/Murali Rubby/demo/library) > == CreateBooks: migrating > ===================================================> -- create_table(:books) > rake aborted! > An error has occurred, all later migrations canceled: > > Mysql::Error: Table ''books'' already exists: CREATE TABLE `books` (`id` > int(11) D > EFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, > `updated_at` date > time) ENGINE=InnoDB > > (See full trace by running task with --trace) > > I spend almost like 20 hrs but I didn''t find the way to fix it. > > I am working on the example given in the tutorialpoint website... > Please help me ... Thanks in advance for your time. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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.
I mean delete books table manually from Database if you don''t have two migration files creating books table. On Sat, May 29, 2010 at 3:49 PM, Haribhau Ingale <hari31582-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> Hi, > > Can you just check once again that you don''t have two migration files > creating books table? If not then you can choose books tables manually. > > Thanks, > --Haribhau > > > > > On Sat, May 29, 2010 at 3:24 AM, DVM <krish1253-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I am beginner for this Rails from the past 2 days I am working hard >> to fix the following error >> >> C:\Murali Rubby\demo\library>rake db:migrate >> (in C:/Murali Rubby/demo/library) >> == CreateBooks: migrating >> ===================================================>> -- create_table(:books) >> rake aborted! >> An error has occurred, all later migrations canceled: >> >> Mysql::Error: Table ''books'' already exists: CREATE TABLE `books` (`id` >> int(11) D >> EFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, >> `updated_at` date >> time) ENGINE=InnoDB >> >> (See full trace by running task with --trace) >> >> I spend almost like 20 hrs but I didn''t find the way to fix it. >> >> I am working on the example given in the tutorialpoint website... >> Please help me ... Thanks in advance for your time. >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-talk?hl=en. >> >> >-- 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.
Krishna Venkata wrote:> I am beginner for this Rails from the past 2 days I am working hard > to fix the following error > > C:\Murali Rubby\demo\library>rake db:migrate > (in C:/Murali Rubby/demo/library) > == CreateBooks: migrating > ===================================================> -- create_table(:books) > rake aborted! > An error has occurred, all later migrations canceled: > > Mysql::Error: Table ''books'' already exists: CREATE TABLE `books` (`id` > int(11) D > EFAULT NULL auto_increment PRIMARY KEY, `created_at` datetime, > `updated_at` date > time) ENGINE=InnoDB > > (See full trace by running task with --trace) > > I spend almost like 20 hrs but I didn''t find the way to fix it. > > I am working on the example given in the tutorialpoint website... > Please help me ... Thanks in advance for your time.You''ve already started one thread on this topic. Please refrain from repeating yourself. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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.
Haribhau Ingale <hari31582@...> writes:> > > I mean delete books table manually from Database if you don''t have twomigration files creating books table.> On Sat, May 29, 2010 at 3:49 PM, Haribhau Ingale<hari31582-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:Hi, Can you just check once again that you don''t have two migration files creating books table? If not then you can choose books tables manually.Thanks,--Haribhau> > > > On Sat, May 29, 2010 at 3:24 AM, DVM<krish1253-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am beginner for this Rails from the past 2 days I am working hard > to fix the following error > C:\Murali Rubby\demo\library>rake db:migrate > (in C:/Murali Rubby/demo/library) > == CreateBooks: migrating > ===================================================------- Hi, For this issue, I see the solution below on the internet, Can you try it: ** Add ":force => true" to your code. example: ........... create_table :books, :force => true do |t| t.string :title, :limit => 32, :null => false .............. ** Try again: rake db:migrate --trace, then look at the Database to see the changes. ** This issue will be resolved by the logic in: - We have the logic to handle this in: ruby\gems\1.8\gems\activerecord-2.3.8\lib\active_record\connection_adapters \abstract\schema_statements.rb Regards, THuynh -- 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.