My project is in the early stages so deleting it and starting over will be no big deal. I want to do this because I ran into a couple of problems with migrations and rollbacks that didn''t leave the system in the state I expected. So, I completely deleted the directory that held the rails project and did a DROP DATABASE on the development, test and production databases. Then (I am using postgresql) I did the necessary CREATE DATABASE commands to recreate the necessary databases and ran a "rails new timecard -d postgresql" to start the project over. I edited the .../config/database.yml file to fix the database user name and password. Then I (re)created my first migration: "rails generate scaffold Tc_project project_number:string..." and then I ran the migration with "rake db:migrate" This did a strange thing: it ran all of the (seemingly deleted) migrations of the previous instance of the timecard application and created all of the tables! The problem is, none of the ''scaffold'' commands were executed for any table except the first, Tc_projects, thus I have no controllers etc. for any of the tables except the first! What happened? Only 1 migration file exists in the .../db/migrate/ directory, how and why did rails execute all of the previous migrations, and, more to the point, how do I stop this from happening? Thanks in advance for any help. 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-/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.
Just out of curiosity, are you running on OSX? Did you open a new Terminal window when you went to run the rake task in your new application? -- 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.
OpenSuse Linux 10. I am a newbie to linux and I had a couple of terminals open so I can''t answer your second question with percision. Could that have an impact on the results? Could a terminal instance have the original migrations in cache, or in some other way interfered with what I am trying to do? Thanks for taking your time to assist with my problem. -Fred On May 18, 9:55 am, Tim Shaffer <timshaf...-BUHhN+a2lJ4@public.gmane.org> wrote:> Just out of curiosity, are you running on OSX? Did you open a new Terminal > window when you went to run the rake task in your new application?-- 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.
Jim Ruther Nill
2011-May-19 00:44 UTC
Re: Re: Starting a project over: what should I delete?
On Thu, May 19, 2011 at 1:11 AM, fredrated <fredp-Sw8Mmj0H/jVYTrM/R70HSA@public.gmane.org> wrote:> OpenSuse Linux 10. > I am a newbie to linux and I had a couple of terminals open so I can''t > answer your second question with percision. > Could that have an impact on the results? Could a terminal instance > have the original migrations in cache, or in some other way interfered > with what I am trying to do? >Nope. this shouldn''t happen. but just to be sure, close all terminals and open a new one. go into the rails directory, delete your database, create a new one and then migrate. another thing you can do is create a new rails project using a different application name. how many migrations did you have on the original project? we''re you editing the migrations when you ran migrate?> > Thanks for taking your time to assist with my problem. -Fred > > On May 18, 9:55 am, Tim Shaffer <timshaf...-BUHhN+a2lJ4@public.gmane.org> wrote: > > Just out of curiosity, are you running on OSX? Did you open a new > Terminal > > window when you went to run the rake task in your new application? > > -- > 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. > >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.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.