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.