Hi all, I''m a newbie I''ve installed RoR on win 7 and this is script\about About your application''s environment Ruby version 1.9.1 (i386-mingw32) RubyGems version 1.3.7 Rack version 1.1 Rails version 2.3.8 Active Record version 2.3.8 Active Resource version 2.3.8 Action Mailer version 2.3.8 Active Support version 2.3.8 Application root F:/rubyProject/depot Environment development Database adapter mysql Database schema version 0 I did: 1- rails depot -d mysql 2- rake db:create 3- I''ve created "products" table with mysql command line editor 4- ruby script\generate scaffold Product 5- I Start webrick 6- go on localhost:3000/products and find (correctly) an empty list 7- I want insert a new product, click on "new" but the page is empty (see img attached) and if I click on "create" ruby crashes... Maybe Rails can''t connect with Mysql or something else... database.yml: development: adapter: mysql encoding: utf8 reconnect: false database: depot_development pool: 5 username: root password: password host: localhost # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: mysql encoding: utf8 reconnect: false database: depot_test pool: 5 username: root password: password host: localhost production: adapter: mysql encoding: utf8 reconnect: false database: depot_production pool: 5 username: root password: password host: localhost Could anybody help me ?? Maaaany thanks Attachments: http://www.ruby-forum.com/attachment/4776/emptyForm.jpg -- 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-/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.
not use 1.9.1 // crash log please Ivan Nastyukhin dieinzige-BUHhN+a2lJ4@public.gmane.org On Jun 7, 2010, at 5:46 PM, An Car wrote:> Hi all, > I''m a newbie > > I''ve installed RoR on win 7 and this is script\about > > About your application''s environment > Ruby version 1.9.1 (i386-mingw32) > RubyGems version 1.3.7 > Rack version 1.1 > Rails version 2.3.8 > Active Record version 2.3.8 > Active Resource version 2.3.8 > Action Mailer version 2.3.8 > Active Support version 2.3.8 > Application root F:/rubyProject/depot > Environment development > Database adapter mysql > Database schema version 0 > > I did: > 1- rails depot -d mysql > 2- rake db:create > 3- I''ve created "products" table with mysql command line editor > 4- ruby script\generate scaffold Product > 5- I Start webrick > 6- go on localhost:3000/products and find (correctly) an empty list > 7- I want insert a new product, click on "new" but the page is empty > (see img attached) > > and if I click on "create" ruby crashes... > > Maybe Rails can''t connect with Mysql or something else... > > database.yml: > > development: > adapter: mysql > encoding: utf8 > reconnect: false > database: depot_development > pool: 5 > username: root > password: password > host: localhost > > # Warning: The database defined as "test" will be erased and > # re-generated from your development database when you run "rake". > # Do not set this db to the same as development or production. > test: > adapter: mysql > encoding: utf8 > reconnect: false > database: depot_test > pool: 5 > username: root > password: password > host: localhost > > production: > adapter: mysql > encoding: utf8 > reconnect: false > database: depot_production > pool: 5 > username: root > password: password > host: localhost > > > Could anybody help me ?? > > Maaaany thanks > > Attachments: > http://www.ruby-forum.com/attachment/4776/emptyForm.jpg > > -- > 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-/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. >-- 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.
On Mon, Jun 7, 2010 at 6:46 AM, An Car <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I did: > 1- rails depot -d mysql > 2- rake db:create > 3- I''ve created "products" table with mysql command line editor > 4- ruby script\generate scaffold Product > 5- I Start webrickWhoa, what? It appears you''ve tried to create a Product model but not specified any attributes for it, so it''s not surprising you''d get an empty "new" page. Second, after you create a new model, you need to get that info into the database, using `rake db:migrate`.> 6- go on localhost:3000/products and find (correctly) an empty list > 7- I want insert a new product, click on "new" but the page is empty > (see img attached)> Maybe Rails can''t connect with Mysql or something else...Uh, "maybe"? You can easily determine that by either looking at your log file, or opening a console and trying something that will need to do a DB access. But build a proper model and run migrations first, and see what happens. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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.
On 7 June 2010 14:46, An Car <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi all, > I''m a newbieHave a look at the rails guides at http://guides.rubyonrails.org/. Start with Getting Started, oddly enough. That will explain some things you are missing and should get you going. The ones on ActiveRecord relationships and Debugging are also compulsory reading. Colin -- 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.