Trying Agile book, found problem

Pg. 57 of Agile asks you to create a scaffolding by typing in
ruby script/generate scaffold Product Admin

Instead of generating everything, it only gives me
exists app/controllers/
exists app/helpers/
exists app/views/admin
exists test/functional/
dependency model
exists app/models/
exists test/unit/
exists test/fixtures/
identical app/models/product.rb
identical test/unit/product_test.rb
identical test/fixtures/products.yml

I understand that a similar problem was reported and fixed here
http://dev.rubyonrails.org/ticket/2537

But my problem isn’t the same as his. He’s only missing one thing - I’m
missing many things.

I’m using Locomotive w/ SQLite3 and OSX.

Thanks very much.

On Thu, 2006-03-30 at 08:49 +0200, Oakes wrote:

  exists    test/unit/

I’m using Locomotive w/ SQLite3 and OSX.


You need to keep the ‘errata’ page handy.

Craig

Craig W. wrote:

On Thu, 2006-03-30 at 08:49 +0200, Oakes wrote:

  exists    test/unit/

I’m using Locomotive w/ SQLite3 and OSX.


You need to keep the ‘errata’ page handy.

Pragmatic Bookshelf: By Developers, For Developers

Craig

It doesn’t appear that my problem is solved there.

Could it possibly be a problem with SQLite? I have the database.yml file
configured correctly I believe

development:
adapter: sqlite3
database: depot_development.sdb

test:
adapter: sqlite3
database: depot_test.sdb

production:
adapter: sqlite3
database: depot_production.sdb

I’m also using SQLiteManager to create the databases, saving them to the
db folder.

Try adding a “db/” in front of all those database files. E.g.

database: db/depot_development.sdb

Don Walker wrote:

Try adding a “db/” in front of all those database files. E.g.

database: db/depot_development.sdb

I’ll try that when I get home, thanks. I was kind of worried about the
“.sdb” extension because all the examples I’ve seen have .db or .sqlite3
or whatever. It’s just the file that SQLiteManager created. Since you
didn’t mention it I’m guessing it’s okay…

Oakes wrote:

Could it possibly be a problem with SQLite? I have the database.yml file
configured correctly I believe

development:
adapter: sqlite3
database: depot_development.sdb

test:
adapter: sqlite3
database: depot_test.sdb

production:
adapter: sqlite3
database: depot_production.sdb

I’m also using SQLiteManager to create the databases, saving them to the
db folder.
SQLiteManager: The most powerful database management system for sqlite databases

Hello,
with sqlite3 you have to write:
development:
adapter: sqlite3
dbfile: depot_development.sdb

Spot the difference between “database” and “dbfile”

Yep, the file extension should be irrevelant.

The paths you provide in database.yml are evaluated from RAILS_ROOT, so
it’s
likely that you were just looking for your database in the wrong place.

Firstname Secondname wrote:

Oakes wrote:

Could it possibly be a problem with SQLite? I have the database.yml file
configured correctly I believe

development:
adapter: sqlite3
database: depot_development.sdb

test:
adapter: sqlite3
database: depot_test.sdb

production:
adapter: sqlite3
database: depot_production.sdb

I’m also using SQLiteManager to create the databases, saving them to the
db folder.
SQLiteManager: The most powerful database management system for sqlite databases

Hello,
with sqlite3 you have to write:
development:
adapter: sqlite3
dbfile: depot_development.sdb

Spot the difference between “database” and “dbfile”
Sorry I forgot to put write folder name. So,
“dbfile: depot_development.sdb” should become “dbfile:
db/depot_development.sdb”. Assuming that your db file is in rails db
directory.

Not true. I use “database” for all my sqlite3 configurations.

Don Walker wrote:

Not true. I use “database” for all my sqlite3 configurations.

please, check if your sqlite3 is not an alias to sqlite 2 or so.

Firstname Secondname wrote:

Sorry I forgot to put write folder name. So,
“dbfile: depot_development.sdb” should become “dbfile:
db/depot_development.sdb”. Assuming that your db file is in rails db
directory.

Hmm, doesn’t seem to work still. It’s generating the same stuff as in
the first post. database.yml currently has

development:
adapter: sqlite3
dbfile: db/depot_development.sdb

test:
adapter: sqlite3
dbfile: db/depot_test.sdb

production:
adapter: sqlite3
dbfile: db/depot_production.sdb

They are definitely sqlite3 databases. The encoding is UTF-8 (I don’t
know what that is but maybe it’s important).

It appears that the problem is pretty rampant…
http://www.ruby-forum.com/search?query=test%2Ffixtures%2Fproducts.yml&forums%5B%5D=3

Only unlike these guys, I’m using SQLite, not MySQL. I’m determined to
make it work on SQLite, but I am completely lost. So early in my first
Rails tutorial too… :frowning:

I never imagined rails would be this hard just to get to work. I’m
finding python a hell of a lot easier, especially with the bigger
support community. Thanks for your help anyway.

Oakes