Not sure if this is another rails 2.0 issue and the info in AWDWR 2nd ed, or not... (I''m new to Rails) I modified the 001_create_products.rb file and added the needed info to create 3 tables in a database that I created using CocoaMySQL. When I ran "rake db:migrate" the info on the console looked good. I then go into CocoaMySQL, select that same database, but there are no tables in it. Any ideas? I also use mysql on the command line to look at that database, but no table to be found. What up with that? Thanks. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Are you sure you specified the correct database in config/database.yml? On Dec 27, 2007 1:13 PM, alfredojahn <alfredojahn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Not sure if this is another rails 2.0 issue and the info in AWDWR 2nd > ed, or not... > > (I''m new to Rails) I modified the 001_create_products.rb file and > added the needed info to create 3 tables in a database that I created > using CocoaMySQL. When I ran "rake db:migrate" the info on the console > looked good. I then go into CocoaMySQL, select that same database, but > there are no tables in it. Any ideas? I also use mysql on the command > line to look at that database, but no table to be found. What up with > that? > > Thanks. > > >-- Ryan Bigg http://www.frozenplague.net Feel free to add me to MSN and/or GTalk as this email. --~--~---------~--~----~------------~-------~--~----~ 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 Wed, 26 Dec 2007 18:43:37 -0800, alfredojahn wrote:> When I ran "rake db:migrate" the info on the console looked good.What''s the result of: rake db:migrate VERSION=0 --trace -Thufir --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thufir wrote:> On Wed, 26 Dec 2007 18:43:37 -0800, alfredojahn wrote: > >> When I ran "rake db:migrate" the info on the console looked good. > > What''s the result of: > > rake db:migrate VERSION=0 --trace > > > > -Thufirrake db:migrate -- this will create tables for you as described in migration files into the database specified in the database.yml file VERSION=0 -- If you are using a version control system it''ll consider the zeroth version of yr project(Mostly initial import to the repository), This can be skipped actually. --trace this is the additional attribute passed with rake command to see the complete log message. You can carry out this jus by giving rake db:migrate this will hold good. -- 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-/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 -~----------~----~----~----~------~----~------~--~---
Thufir if u have different doubt than the existing thread pls dont post there itself start a new thread and post there... So that the continuity/tracability will be maintained.... -- 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-/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 Thu, 27 Dec 2007 08:31:26 +0100, Ratnavel Sundaramurthi wrote:> Thufir if u have different doubt than the existing thread pls dont post > there itself start a new thread and post there...Pardon, I don''t follow your point. Yes, I''m all for thread continuity :) -Thufir --~--~---------~--~----~------------~-------~--~----~ 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 Dec 26, 2007 9:43 PM, alfredojahn <alfredojahn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Not sure if this is another rails 2.0 issue and the info in AWDWR 2nd > ed, or not... > > (I''m new to Rails) I modified the 001_create_products.rb file and > added the needed info to create 3 tables in a database that I created > using CocoaMySQL.Had you already migrated using this migration before you modified it? This is the picture I get from saying you modified it rather than creating it. > When I ran "rake db:migrate" the info on the console> looked good. I then go into CocoaMySQL, select that same database, but > there are no tables in it. Any ideas? I also use mysql on the command > line to look at that database, but no table to be found. What up with > that?If you really did modify it, then rake db:migrate probably didn''t do anything other than get the current schema version from the database, notice that it was already 1, and quit. In general you want to generate a new migration each time you make a schema change to the database. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.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-/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 -~----------~----~----~----~------~----~------~--~---
alfredojahn wrote:> I then go into CocoaMySQL, select that same database, but > there are no tables in it. Any ideas? I also use mysql on the command > line to look at that database, but no table to be found. What up with > that?I had the same problem as you and found my answer here: http://weblog.rubyonrails.org/2007/12/17/rails-2-0-2-some-new-defaults-and-a-few-fixes "SQLite3 is the new default database... If you want to preconfigure your database for MySQL (or any of the other adapters), you simply do rails -d mysql myapp and everything is the same as before. " So I recreated my app as above and the tables are now showing in MySQL. Greg. -- 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-/JYPxA39Uh5TLH3MbocFFw@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 -~----------~----~----~----~------~----~------~--~---