Forum: Ruby on Rails Trying Agile book, found problem

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Oakes (Guest)
on 2006-03-30 10:49
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.
Craig W. (Guest)
on 2006-03-30 16:47
(Received via mailing list)
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
Oakes (Guest)
on 2006-03-30 18:35
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.
Oakes (Guest)
on 2006-03-30 20:16
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
Don W. (Guest)
on 2006-03-30 20:31
(Received via mailing list)
Try adding a "db/" in front of all those database files. E.g.

  database: db/depot_development.sdb
Oakes (Guest)
on 2006-03-30 20:33
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...
Marius Å. (Guest)
on 2006-03-30 20:45
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"
Don W. (Guest)
on 2006-03-30 20:49
(Received via mailing list)
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.
Marius Å. (Guest)
on 2006-03-30 20:57
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.
Don W. (Guest)
on 2006-03-30 20:58
(Received via mailing list)
Not true. I use "database" for all my sqlite3 configurations.
Marius Å. (Guest)
on 2006-03-30 21:21
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.
Oakes (Guest)
on 2006-03-30 22:41
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).
Oakes (Guest)
on 2006-03-31 00:37
It appears that the problem is pretty rampant...
http://www.ruby-forum.com/search?query=test%2Ffixt...

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... :-(
Oakes (Guest)
on 2006-03-31 04:39
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
This topic is locked and can not be replied to.