Trying Agile book, found problem


#1

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.


#2

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.

http://books.pragprog.com/titles/rails/errata

Craig


#3

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.

http://books.pragprog.com/titles/rails/errata

Craig

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


#4

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.
http://www.sqlabs.net/sqlitemanager.php


#5

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

database: db/depot_development.sdb


#6

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…


#7

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.
http://www.sqlabs.net/sqlitemanager.php

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

Spot the difference between “database” and “dbfile”


#8

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.


#9

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.
http://www.sqlabs.net/sqlitemanager.php

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.


#10

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


#11

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.


#12

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).


#13

It appears that the problem is pretty rampant…
http://www.ruby-forum.com/search?query=test%2Ffixtures%2Fproducts.yml&forums[]=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:


#14

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