Talha Oktay
2006-Jan-22 00:24 UTC
[Rails] a newbie doomed in the first introduction to ruby.
Hello, I have bought the Dave Thomas Agile Developtment with Rails. (I have previously bought and read his Programming with Ruby book) On my winxp sp2 system ruby 1.8.15 (one click installer), rails 1.0framework (with ruby gems) and mysql 5.0 are installed. While following the example stated in the Chapter Building an Application I had following problem. After creating databases for test, production, development, and creating a Product table for development database, I modified the config/database.yml file and I issued the command "ruby script/generate scaffold Product Admin" depot application I have received "No connection could be made beacuse the target machine actively refused it. - connect(2)" while generate script processing product.yml file. I tought that it was a firewall problem and disabled the personal firewall. After issuing the same command I still received the same error. When I tried to acces localhost:3000/admin site, I receive a page on which "recognition failed for /admin" is written. I do not think that I misconfigured database.ym file. I put the users and their passwords whom all are granted access to the specified databases. development.log has following line for each attempt I made =======================================================Processing Base#index (for 127.0.0.1 at 2006-01-22 01:29:24) [GET] Parameters: {} ActionController::RoutingError (Recognition failed for "/admin"): d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:469:in `recognition_failed'' d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:459:in `recognize!'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:117:in `handle_dispatch'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:83:in `service'' d:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' d:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:69:in `dispatch'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0 /lib/commands/servers/webrick.rb:59 d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' d:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in `require'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0 /lib/commands/server.rb:28 d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' d:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in `require'' script/server:3 Rendering d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) ================================ Any help will be greatly appreciated. Talha -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060122/96c7a79a/attachment-0001.html
John McGrath
2006-Jan-22 01:45 UTC
[Rails] a newbie doomed in the first introduction to ruby.
sounds like a mysql issue. can you connect to the dbs as the users you have configured in database.yml through other means (ie, besides rails)? in database.yml, are you using the socket or host configuration to connect? i think by default host is commented out, and socket enabled. try commenting out the socket line for the dbs, and uncommenting the host and port lines. also, the necessary grants are specified on pg 54 of ''agile'', and this helps too: http://dev.mysql.com/doc/refman/5.0/en/adding-users.html just some thoughts. good luck. _______________________________________________ John McGrath http://fryolator.com <http://fryolator.com/> -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Talha Oktay Sent: Saturday, January 21, 2006 4:25 PM To: rails@lists.rubyonrails.org Subject: [Rails] a newbie doomed in the first introduction to ruby. Hello, I have bought the Dave Thomas Agile Developtment with Rails. (I have previously bought and read his Programming with Ruby book) On my winxp sp2 system ruby 1.8.15 (one click installer), rails 1.0 framework (with ruby gems) and mysql 5.0 are installed. While following the example stated in the Chapter Building an Application I had following problem. After creating databases for test, production, development, and creating a Product table for development database, I modified the config/database.yml file and I issued the command "ruby script/generate scaffold Product Admin" depot application I have received "No connection could be made beacuse the target machine actively refused it. - connect(2)" while generate script processing product.yml file. I tought that it was a firewall problem and disabled the personal firewall. After issuing the same command I still received the same error. When I tried to acces localhost:3000/admin site, I receive a page on which "recognition failed for /admin" is written. I do not think that I misconfigured database.ym file. I put the users and their passwords whom all are granted access to the specified databases. development.log has following line for each attempt I made =======================================================Processing Base#index (for 127.0.0.1 at 2006-01-22 01:29:24) [GET] Parameters: {} ActionController::RoutingError (Recognition failed for "/admin"): d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/ routing.rb:469:in `recognition_failed'' d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/ routing.rb:459:in `recognize!'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:117:in `handle_dispatch'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:83:in `service'' d:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' d:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:69:in `dispatch'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/servers/webrick .rb:59 d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' d:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/d ependencies.rb:214:in `require'' d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/server.rb:28 d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require__'' d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in `require'' d:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/d ependencies.rb:214:in `require'' script/server:3 Rendering d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/ templates/rescues/layout.rhtml (404 Page Not Found) ================================ Any help will be greatly appreciated. Talha -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060122/9bb3ffd6/attachment-0001.html
Ben Reubenstien
2006-Jan-22 02:08 UTC
[Rails] a newbie doomed in the first introduction to ruby.
I''ve posted this before, but it might help. Of course this kind of setup will need to be adjusted if the databases do not all have the same user name and password. authentication: &authentication adapter: mysql host: host_name_here username: user_name_here password: mysql_password_here development: database: db_development <<: *authentication test: database: db_test <<: *authentication production: database: db_production <<: *authentication On 1/21/06, John McGrath <jmcgrath@whoi.edu> wrote:> > sounds like a mysql issue. can you connect to the dbs as the users you > have configured in database.yml through other means (ie, besides rails)? > > in database.yml, are you using the socket or host configuration to > connect? i think by default host is commented out, and socket enabled. try > commenting out the socket line for the dbs, and uncommenting the host and > port lines. > > also, the necessary grants are specified on pg 54 of ''agile'', and this > helps too: > http://dev.mysql.com/doc/refman/5.0/en/adding-users.html > > just some thoughts. good luck. > > _______________________________________________ > > John McGrath > http://fryolator.com > > > -----Original Message----- > *From:* rails-bounces@lists.rubyonrails.org [mailto: > rails-bounces@lists.rubyonrails.org] *On Behalf Of *Talha Oktay > *Sent:* Saturday, January 21, 2006 4:25 PM > *To:* rails@lists.rubyonrails.org > *Subject:* [Rails] a newbie doomed in the first introduction to ruby. > > Hello, > > I have bought the Dave Thomas Agile Developtment with Rails. (I have > previously bought and read his Programming with Ruby book) > > On my winxp sp2 system ruby 1.8.15 (one click installer), rails 1.0framework (with ruby gems) and mysql > 5.0 are installed. > > While following the example stated in the Chapter Building an Application > I had following problem. > > After creating databases for test, production, development, and creating a > Product table for development database, > I modified the config/database.yml file and I issued the command "ruby > script/generate scaffold Product Admin" depot application > > I have received "No connection could be made beacuse the target machine > actively refused it. - connect(2)" while generate script processing > product.yml file. > > I tought that it was a firewall problem and disabled the personal > firewall. After issuing the same command I still received the same error. > > When I tried to acces localhost:3000/admin site, I receive a page on > which "recognition failed for /admin" is written. > > I do not think that I misconfigured database.ym file. I put the users and > their passwords whom all are granted access to the specified databases. > > development.log has following line for each attempt I made > > =======================================================> Processing Base#index (for 127.0.0.1 at 2006-01-22 01:29:24) [GET] > Parameters: {} > > > ActionController::RoutingError (Recognition failed for "/admin"): > d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:469:in > `recognition_failed'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/routing.rb:459:in > `recognize!'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in > `dispatch'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:117:in > `handle_dispatch'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:83:in > `service'' > d:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' > d:/apps/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > d:/apps/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/webrick_server.rb:69:in > `dispatch'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0 > /lib/commands/servers/webrick.rb:59 > d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__'' > d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in > `require'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/rails-1.0.0 > /lib/commands/server.rb:28 > d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require__'' > d:/apps/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:18:in > `require'' > d:/apps/ruby/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in > `require'' > script/server:3 > > > Rendering d:/apps/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/layout.rhtml > (404 Page Not Found) > > ================================> > Any help will be greatly appreciated. > > Talha > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Ben Reubenstein http://www.benr75.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060122/dadd6aae/attachment.html