I am using RadRails and reading through the Dummies book. I have created a db (company) and a model (Employee). I edited the 001_create_employees.rb script by copy and paste from the book. When I use Rake Tasks (db:migrate) -> Go, after a few moments the Console displays "<terminated> migrate [internal launch] rake (datetime)", and no db table is created. I tested the db credentials using the mysql client on the command line and that appears correct. I don''t know what else to do at this point. Can anyone give me a hint? --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 5 Feb 2008, at 07:59, rogwei wrote:> > I am using RadRails and reading through the Dummies book. I have > created a db (company) and a model (Employee). I edited the > 001_create_employees.rb script by copy and paste from the book. When I > use Rake Tasks (db:migrate) -> Go, after a few moments the Console > displays "<terminated> migrate [internal launch] rake (datetime)", and > no db table is created. I tested the db credentials using the mysql > client on the command line and that appears correct. I don''t know what > else to do at this point. Can anyone give me a hint?Had you run the migration before? If you run a (for example) empty migration and then edit it, rails won''t rerun the migration. You need to migrate down (rake rb:migrate VERSION=XXX) and back up again. Other than that, maybe something is up with the migration itself? Fred> > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
The full story...I started using Rails 2.0 but found the book author''s blog that said you had to downgrade to 1.2.3 for all the samples to work. Consequently, I uninstalled Rails 2.0 and installed 1.2.3. I deleted the original company project (from disk, too), dropped the previously migrated employees table in phpAdmin, and started over. Where does Rake get its memory of the previous migration? On Feb 5, 1:22 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 5 Feb 2008, at 07:59, rogwei wrote: > > > > > I am using RadRails and reading through the Dummies book. I have > > created a db (company) and a model (Employee). I edited the > > 001_create_employees.rb script by copy and paste from the book. When I > > use Rake Tasks (db:migrate) -> Go, after a few moments the Console > > displays "<terminated> migrate [internal launch] rake (datetime)", and > > no db table is created. I tested the db credentials using the mysql > > client on the command line and that appears correct. I don''t know what > > else to do at this point. Can anyone give me a hint? > > Had you run the migration before? If you run a (for example) empty > migration and then edit it, rails won''t rerun the migration. You need > to migrate down (rake rb:migrate VERSION=XXX) and back up again. > Other than that, maybe something is up with the migration itself? > > Fred > >--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ok, I used the VERSION=001 option in Rake and it worked. Thanks, Frederick. On Feb 5, 10:05 am, rogwei <rog...-Wuw85uim5zDR7s880joybQ@public.gmane.org> wrote:> The full story...I started using Rails 2.0 but found the book author''s > blog that said you had to downgrade to 1.2.3 for all the samples to > work. Consequently, I uninstalled Rails 2.0 and installed 1.2.3. I > deleted the original company project (from disk, too), dropped the > previously migrated employees table in phpAdmin, and started over. > Where does Rake get its memory of the previous migration? > > On Feb 5, 1:22 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > On 5 Feb 2008, at 07:59, rogwei wrote: > > > > I am using RadRails and reading through the Dummies book. I have > > > created a db (company) and a model (Employee). I edited the > > > 001_create_employees.rb script by copy and paste from the book. When I > > > use Rake Tasks (db:migrate) -> Go, after a few moments the Console > > > displays "<terminated> migrate [internal launch] rake (datetime)", and > > > no db table is created. I tested the db credentials using the mysql > > > client on the command line and that appears correct. I don''t know what > > > else to do at this point. Can anyone give me a hint? > > > Had you run the migration before? If you run a (for example) empty > > migration and then edit it, rails won''t rerun the migration. You need > > to migrate down (rake rb:migrate VERSION=XXX) and back up again. > > Other than that, maybe something is up with the migration itself? > > > Fred--~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---