Hello, I just started learning RoR myself, and I have a few newbie questions. (1) Is it always necessary to use the "script/generate" to start an app? Can it be created from scratch if one wanted to? (Not that I would, but I''m trying to understand...) (2) I followed the rails getting started guide to create a blog successfully. Then I thought of adding a login/authentication mechanism, and proceeded to run the "script/generate login" (after getting login_generator.zip) on the same rail app. It messed up the original blog, because it had file name conflicts (I think). How would I run multiple "script/generate" on an app without messing up the app? Thanks! Kumi --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
1) It is definitely not necessary to use "script/generate" but it can be very helpful when you''re just starting out. The variants on generate (run "script/generate --help" and check out the installed generators) can give you a good idea on how the different MVC components hang together. 2) Yes, well there seems to be a growing dissatisfaction with plugins that rely on generate to build your app. My guess is that your experience is part of the reason. Configuration management (svn or git) can be invaluable here. You really want to be able to back out the recent damage on occasion. As far as running multiple generates you need to understand what''s going on with the different generators, i.e.: generate model User name:string profile:text generate scaffold User name:string profile:text both create a user.rb model and migration but scaffold also builds the controller and views as well as adding routes. You need to understand what is created when you issue the generate command and the best way I''ve found is to run it and study the results. On Apr 13, 8:42 am, khagimoto <kumi.hagim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, > I just started learning RoR myself, and I have a few newbie questions. > > (1) Is it always necessary to use the "script/generate" to start an > app? Can it be created from scratch if one wanted to? (Not that I > would, but I''m trying to understand...) > > (2) I followed the rails getting started guide to create a blog > successfully. Then I thought of adding a login/authentication > mechanism, and proceeded to run the "script/generate login" (after > getting login_generator.zip) on the same rail app. It messed up the > original blog, because it had file name conflicts (I think). How > would I run multiple "script/generate" on an app without messing up > the app? > > Thanks! > Kumi--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Thanks very much for this clarification. You''re right, I''m usually coding things myself and not used to the concept of having things generated for me. I do have git, so I was able to back out. It sounds like the best way for me is to learn what a lot of plugins do when generated, and combine those myself without using the generate. Just what you suggested.. :-) Thanks!! On Apr 14, 3:01 am, Rick <Richard.T.Ll...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 1) It is definitely not necessary to use "script/generate" but it can > be very helpful when you''re just starting out. The variants on > generate (run "script/generate --help" and check out the installed > generators) can give you a good idea on how the different MVC > components hang together. > > 2) Yes, well there seems to be a growing dissatisfaction with plugins > that rely on generate to build your app. My guess is that your > experience is part of the reason. Configuration management (svn or > git) can be invaluable here. You really want to be able to back out > the recent damage on occasion. > > As far as running multiple generates you need to understand what''s > going on with the different generators, i.e.: > > generate model User name:string profile:text > generate scaffold User name:string profile:text > > both create a user.rb model and migration but scaffold also builds the > controller and views as well as adding routes. > > You need to understand what is created when you issue the generate > command and the best way I''ve found is to run it and study the > results. > > On Apr 13, 8:42 am, khagimoto <kumi.hagim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello, > > I just started learning RoR myself, and I have a few newbie questions. > > > (1) Is it always necessary to use the "script/generate" to start an > > app? Can it be created from scratch if one wanted to? (Not that I > > would, but I''m trying to understand...) > > > (2) I followed the rails getting started guide to create a blog > > successfully. Then I thought of adding a login/authentication > > mechanism, and proceeded to run the "script/generate login" (after > > getting login_generator.zip) on the same rail app. It messed up the > > original blog, because it had file name conflicts (I think). How > > would I run multiple "script/generate" on an app without messing up > > the app? > > > Thanks! > > Kumi--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Glad I could help. On Apr 14, 5:24 am, khagimoto <kumi.hagim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks very much for this clarification. You''re right, I''m usually > coding things myself and not used to the concept of having things > generated for me. I do have git, so I was able to back out. It > sounds like the best way for me is to learn what a lot of plugins do > when generated, and combine those myself without using the generate. > Just what you suggested.. :-) Thanks!! > > On Apr 14, 3:01 am,Rick<Richard.T.Ll...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 1) It is definitely not necessary to use "script/generate" but it can > > be very helpful when you''re just starting out. The variants on > > generate (run "script/generate --help" and check out the installed > > generators) can give you a good idea on how the different MVC > > components hang together. > > > 2) Yes, well there seems to be a growing dissatisfaction with plugins > > that rely on generate to build your app. My guess is that your > > experience is part of the reason. Configuration management (svn or > > git) can be invaluable here. You really want to be able to back out > > the recent damage on occasion. > > > As far as running multiple generates you need to understand what''s > > going on with the different generators, i.e.: > > > generate model User name:string profile:text > > generate scaffold User name:string profile:text > > > both create a user.rb model and migration but scaffold also builds the > > controller and views as well as adding routes. > > > You need to understand what is created when you issue the generate > > command and the best way I''ve found is to run it and study the > > results. > > > On Apr 13, 8:42 am, khagimoto <kumi.hagim...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hello, > > > I just started learning RoR myself, and I have a few newbie questions. > > > > (1) Is it always necessary to use the "script/generate" to start an > > > app? Can it be created from scratch if one wanted to? (Not that I > > > would, but I''m trying to understand...) > > > > (2) I followed the rails getting started guide to create a blog > > > successfully. Then I thought of adding a login/authentication > > > mechanism, and proceeded to run the "script/generate login" (after > > > getting login_generator.zip) on the same rail app. It messed up the > > > original blog, because it had file name conflicts (I think). How > > > would I run multiple "script/generate" on an app without messing up > > > the app? > > > > Thanks! > > > Kumi--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---