Wrox Programmer Forums
|
BOOK: Beginning Ruby on Rails
This is the forum to discuss the Wrox book Beginning Ruby on Rails by Steve Holzner Ph.D.; ISBN: 9780470069158
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Ruby on Rails section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2007, 02:20 PM
Registered User
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6: store not working

I having a problem. I write
Quote:
quote:ruby script/generate scaffold Item Manage
like on page 167, but i have an error, and the application don't work:
Quote:
quote:
E:\rubydev\store>ruby script/generate scaffold Item Manage
      exists app/controllers/
      exists app/helpers/
      create app/views/manage
      exists app/views/layouts/
      exists test/functional/
  dependency model
      exists app/models/
      exists test/unit/
      exists test/fixtures/
      create app/models/item.rb
      create test/unit/item_test.rb
      create test/fixtures/items.yml
Bad file descriptor - connect(2)

E:\rubydev\store>
The MySQL databeses is working and the table items too.
Quote:
quote:
mysql> show databases;
+---------------------+
| Database |
+---------------------+
| information_schema |
| mysql |
| store_development |
| store_production |
| store_test |
| test |
+---------------------+
9 rows in set (0.01 sec)

mysql> use store_development
Database changed
mysql> show tables;
+-----------------------------+
| Tables_in_store_development |
+-----------------------------+
| items |
+-----------------------------+
1 row in set (0.00 sec)

mysql> describe items;
+-------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(80) | NO | | | |
| description | text | NO | | | |
| price | decimal(8,2) | NO | | | |
+-------------+--------------+------+-----+---------+----------------+
4 rows in set (0.11 sec)

mysql>
The database.yml file is right.
Any assistance in getting this to work would be great. Thanks.
 
Old May 16th, 2007, 04:57 PM
Registered User
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have find the solution. Finally.
Rails need who mysql listening on port 3306, hence on file my.ini under [mysql] and [mysqld] i change my 3309 with 3306.
I hope this discovery be of use for folk. byebye
 
Old June 17th, 2007, 11:17 PM
Registered User
 
Join Date: Jun 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have a similar issue, I type:

Code:
ruby script/generate scaffold Item Manage
I get:

Code:
      exists  app/controllers/
      exists  app/helpers/
      create  app/views/manage
      exists  app/views/layouts/
      exists  test/functional/
  dependency  model
      exists    app/models/
      exists    test/unit/
      exists    test/fixtures/
      create    app/models/item.rb
      create    test/unit/item_test.rb
      create    test/fixtures/items.yml
dyld: ruby can't open library: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib  (No such file or directory, errno = 2)
Trace/BPT trap
I am running Mac OS X 10.3.9.

any help or suggestions would help, I don't have a my.ini.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 3 - a:visited not working VeganMan BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 4 April 3rd, 2008 12:31 AM
Chapter 1: Greeting Not Working Joe3000 BOOK: Beginning Ruby on Rails 2 June 14th, 2007 10:54 AM
Working Code for Chapter 4 clomby BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 1 December 26th, 2005 06:44 AM
CHAPTER 18 example not working also! diegoborgh BOOK: Beginning JavaServer Pages 0 May 26th, 2005 11:16 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.