I am running 2.0.2 on a windows machine. I created a new project. Used the new generate scaffold to create a MVC for "Song". That worked. However when I tried to create scaffold for the next file, "Content" I get NO views/models/controller ... Here is the command I am using. E:\RubyProjects\crmusic\rails script/generator scaffold Content songs_id:integer contentype:string filename:string size:integer content_type:integer I run this and it creates all of the base structures but does NOT create the MVC for "Content". I am sure that I am doing something silly, but do not see what it is. Any help would be appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
HI, Rails 2.0 does not have the scaffold package, you should install it by hand. See http://activescaffold.com/ Cheers, Pablo.- On Dec 26, 2007 11:03 AM, ...bartee... <bartee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > I am running 2.0.2 on a windows machine. > > I created a new project. > > Used the new generate scaffold to create a MVC for "Song". That > worked. > > However when I tried to create scaffold for the next file, "Content" I > get NO views/models/controller ... > > Here is the command I am using. > > E:\RubyProjects\crmusic\rails script/generator scaffold Content > songs_id:integer contentype:string filename:string size:integer > content_type:integer > > I run this and it creates all of the base structures but does NOT > create the MVC for "Content". > > I am sure that I am doing something silly, but do not see what it is. > > Any help would be appreciated. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Rails 2.0 does have the scaffold package. In fact, it now scaffolds REST compatible resources (previously known as scaffold_resource in Rail 1.2). It seems your command is wrong. It''s script/generate, not script/ generator. Also, since you''re on windows, you have to specify ''ruby'' before the command. F:\code\test>ruby script/generate scaffold Content songs_id:integer contentype:string filename:string size:integer content_type:integer exists app/models/ exists app/controllers/ exists app/helpers/ create app/views/contents exists app/views/layouts/ exists test/functional/ exists test/unit/ create app/views/contents/index.html.erb create app/views/contents/show.html.erb create app/views/contents/new.html.erb create app/views/contents/edit.html.erb create app/views/layouts/contents.html.erb create public/stylesheets/scaffold.css dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/content.rb create test/unit/content_test.rb create test/fixtures/contents.yml create db/migrate create db/migrate/001_create_contents.rb create app/controllers/contents_controller.rb create test/functional/contents_controller_test.rb create app/helpers/contents_helper.rb route map.resources :contents On Dec 26, 9:03 am, "...bartee..." <bar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am running 2.0.2 on a windows machine. > > I created a new project. > > Used the new generate scaffold to create a MVC for "Song". That > worked. > > However when I tried to create scaffold for the next file, "Content" I > get NO views/models/controller ... > > Here is the command I am using. > > E:\RubyProjects\crmusic\rails script/generator scaffold Content > songs_id:integer contentype:string filename:string size:integer > content_type:integer > > I run this and it creates all of the base structures but does NOT > create the MVC for "Content". > > I am sure that I am doing something silly, but do not see what it is. > > Any help would be appreciated.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ian, You are right, I missunderestood the question. Sorry. On Dec 26, 2007 11:38 AM, Ian Zabel <ianzabel-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Rails 2.0 does have the scaffold package. In fact, it now scaffolds > REST compatible resources (previously known as scaffold_resource in > Rail 1.2). > > It seems your command is wrong. It''s script/generate, not script/ > generator. Also, since you''re on windows, you have to specify ''ruby'' > before the command. > > F:\code\test>ruby script/generate scaffold Content songs_id:integer > contentype:string filename:string size:integer content_type:integer > exists app/models/ > exists app/controllers/ > exists app/helpers/ > create app/views/contents > exists app/views/layouts/ > exists test/functional/ > exists test/unit/ > create app/views/contents/index.html.erb > create app/views/contents/show.html.erb > create app/views/contents/new.html.erb > create app/views/contents/edit.html.erb > create app/views/layouts/contents.html.erb > create public/stylesheets/scaffold.css > dependency model > exists app/models/ > exists test/unit/ > exists test/fixtures/ > create app/models/content.rb > create test/unit/content_test.rb > create test/fixtures/contents.yml > create db/migrate > create db/migrate/001_create_contents.rb > create app/controllers/contents_controller.rb > create test/functional/contents_controller_test.rb > create app/helpers/contents_helper.rb > route map.resources :contents > > > On Dec 26, 9:03 am, "...bartee..." <bar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I am running 2.0.2 on a windows machine. > > > > I created a new project. > > > > Used the new generate scaffold to create a MVC for "Song". That > > worked. > > > > However when I tried to create scaffold for the next file, "Content" I > > get NO views/models/controller ... > > > > Here is the command I am using. > > > > E:\RubyProjects\crmusic\rails script/generator scaffold Content > > songs_id:integer contentype:string filename:string size:integer > > content_type:integer > > > > I run this and it creates all of the base structures but does NOT > > create the MVC for "Content". > > > > I am sure that I am doing something silly, but do not see what it is. > > > > Any help would be appreciated. > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ian, THANKS !!! This is an amazing list. Thank you for taking the time to response. It worked, now I can get on to more rails 2.0 learing here http://www.akitaonrails.com/2007/12/12/rolling-with-rails-2-0-the-first-full-tutorial -- 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 -~----------~----~----~----~------~----~------~--~---
I have created a screencast that is updated version of onlamp.com Rolling With Rails for Rails 2.0, check it out: http://www.rubyplus.org/episodes/17-Rolling-with-Ruby-on-Rails-Revised-Rails-2-.html You can now learn Rails 2.0 from here too! Enjoy. On Dec 27, 2007 1:41 AM, Bartee Lamar <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Ian, > > THANKS !!! > > This is an amazing list. Thank you for taking the time to response. > >-- http://www.rubyplus.org/ Free Ruby and Rails Screencasts --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
i''m running into a similar problem now, having upgraded to rails 2.0.2. I ran the scaffold command, and i get the views, but it''s not generating the controller. has anyone else seen this? Thanks, John On Dec 26 2007, 6:03 am, "...bartee..." <bar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am running 2.0.2 on a windows machine. > > I created a new project. > > Used the new generate scaffold to create a MVC for "Song". That > worked. > > However when I tried to create scaffold for the next file, "Content" I > get NO views/models/controller ... > > Here is the command I am using. > > E:\RubyProjects\crmusic\rails script/generator scaffold Content > songs_id:integer contentype:string filename:string size:integer > content_type:integer > > I run this and it creates all of the base structures but does NOT > create the MVC for "Content". > > I am sure that I am doing something silly, but do not see what it is. > > Any help would be appreciated.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
johnrails wrote:> i''m running into a similar problem now, having upgraded to rails > 2.0.2. I ran the scaffold command, and i get the views, but it''s not > generating the controller. has anyone else seen this?Yes. This happened to me once, then I checked the output of the generator and saw that it had crapped out creating the model because I''d already done that. If you look at the list it should go something like this (from Zabel''s post): create app/models/content.rb create test/unit/content_test.rb create test/fixtures/contents.yml create db/migrate create db/migrate/001_create_contents.rb create app/controllers/contents_controller.rb so if it bombs at the model, it won''t create the controller. Possibly your problem? I''d have hoped the generator would have accepted that the model already existed and continued. The rails 1.2 scaffolder managed this if I remember rightly... -- 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 -~----------~----~----~----~------~----~------~--~---
http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/864adb5cc95c1cff/c0cfbaa0c8388467?lnk=st&q=#c0cfbaa0c8388467 On Feb 22, 3:26 pm, Mark Bush <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> johnrails wrote: > > i''m running into a similar problem now, having upgraded to rails > > 2.0.2. I ran the scaffold command, and i get the views, but it''s not > > generating the controller. has anyone else seen this? > > Yes. This happened to me once, then I checked the output of the > generator and saw that it had crapped out creating the model because I''d > already done that. If you look at the list it should go something like > this (from Zabel''s post): > > create app/models/content.rb > create test/unit/content_test.rb > create test/fixtures/contents.yml > create db/migrate > create db/migrate/001_create_contents.rb > create app/controllers/contents_controller.rb > > so if it bombs at the model, it won''t create the controller. > > Possibly your problem? > > I''d have hoped the generator would have accepted that the model already > existed and continued. The rails 1.2 scaffolder managed this if I > remember rightly... > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
Why the new version of scaffold read the table from the database and add the filed to the model/*.html.erb? So I have to add every single fileds/types in the command line?? On Feb 23, 3:33 pm, mel ram <mel...-IA9i2KS8NFBpEKysQ+xqfPpXobYPEAuW@public.gmane.org> wrote:> http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/... > > On Feb 22, 3:26 pm, Mark Bush <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> > wrote: > > > johnrails wrote: > > > i''m running into a similar problem now, having upgraded to rails > > > 2.0.2. I ran the scaffold command, and i get the views, but it''s not > > > generating the controller. has anyone else seen this? > > > Yes. This happened to me once, then I checked the output of the > > generator and saw that it had crapped out creating the model because I''d > > already done that. If you look at the list it should go something like > > this (from Zabel''s post): > > > create app/models/content.rb > > create test/unit/content_test.rb > > create test/fixtures/contents.yml > > create db/migrate > > create db/migrate/001_create_contents.rb > > create app/controllers/contents_controller.rb > > > so if it bombs at the model, it won''t create the controller. > > > Possibly your problem? > > > I''d have hoped the generator would have accepted that the model already > > existed and continued. The rails 1.2 scaffolder managed this if I > > remember rightly... > > > -- > > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---