hello, i''m a newbie . . . after a few installation problems finally i got ruby and the rails running. however, i did the scaffolding on a sample database (i created 2 records) and on the main page i see 2 edit and 2 delete links. which means to me that the model is connected to the database .. . . i clicked on the "new" link and created another record with a title and a little text. it created a new record but didn''t save the data to the DB just got a new id. i''m running a debian 4 with xampp and apache2 ... thank you for your help... iM --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Well your problem sounds weird. Usually a id is assigned only when the record is saved to the database. However please report the rails version you are using. Rails 2.0 is not supporting scaffold anymore. On Jan 11, 5:20 pm, imehesz <imeh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> hello, > > i''m a newbie . . . after a few installation problems finally i got > ruby and the rails running. > > however, i did the scaffolding on a sample database (i created 2 > records) and on the main page i see 2 edit and 2 delete links. which > means to me that the model is connected to the database .. . . > > i clicked on the "new" link and created another record with a title > and a little text. it created a new record but didn''t save the data to > the DB just got a new id. > > i''m running a debian 4 with xampp and apache2 ... > > thank you for your help... > > iM--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Check out the AWDwR screencast series at http://www.rubyplus.org/ , I cover the topic of using scaffold in Rails 2.0 On Jan 11, 2008 5:20 PM, imehesz <imehesz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > hello, > > i''m a newbie . . . after a few installation problems finally i got > ruby and the rails running. > > however, i did the scaffolding on a sample database (i created 2 > records) and on the main page i see 2 edit and 2 delete links. which > means to me that the model is connected to the database .. . . > >-- 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 -~----------~----~----~----~------~----~------~--~---
Also a newbie so please tell me if I have a bad assumption. You used a generator for scaffolding right? Rails 2 has a bit different syntax and if a part of it is that you explicitly have to say what columns you want used in the scaffold (name_of_column:sql_type) . Example, you have a table named pets with columns name, age, place_of_birth ... You generate a scaffold with script/generate scaffold Pet name:text age:integer ... Hope this helped On Jan 12, 12:17 pm, "Bala Paranj" <bcpar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Check out the AWDwR screencast series athttp://www.rubyplus.org/ , I cover the topic of using scaffold in Rails 2.0 > > On Jan 11, 2008 5:20 PM, imehesz <imeh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > hello, > > > i''m a newbie . . . after a few installation problems finally i got > > ruby and the rails running. > > > however, i did the scaffolding on a sample database (i created 2 > > records) and on the main page i see 2 edit and 2 delete links. which > > means to me that the model is connected to the database .. . . > > --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 -~----------~----~----~----~------~----~------~--~---
well, if I type: "ruby -v" I got this back: ruby 1.8.5 (2006-08-25) [i486-linux] so i guess this is not 2.0 :( what I did under debian: "apt-get install ruby rdoc1.8 irb libyaml-ruby libzlib-ruby" i downloaded the gems and ... : "gem1.8 install rubygems" and the rails: "gem1.8 install rails" something was going on and I had to install openssl ... everything seemed fine so I looked up some tutorials and tried one of the examples .... that''s all i am an old time PHP guy ;) so i knew something is very weird when I could insert a new record but only the ID got saved ... thanks for your advices .... i''ll check ''em out! --iM --~--~---------~--~----~------------~-------~--~----~ 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 am sooo stupidos sorry... my RAILS version is: Rails 2.0.2 :( as I said. i''m a newbie :D --iM --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
thank you, it did help ... that was an old tutorial. --iM --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---