but am having problems with the database.yml file, I believe.
This may be due to my using a different platform than the author. I've
tried a few different variations on the database.yml file, here's what I
currently have:
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ ShoppingList/script/generate controller
ListItems
/usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/active_record/
connection_adapters/abstract/connection_specification.rb:208:in
`establish_connection': database configuration does not specify adapter
(ActiveRecord::AdapterNotSpecified)
from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/
active_record/connection_adapters/abstract/
connection_specification.rb:202:in `establish_connection'
from /usr/lib/ruby/gems/1.8/gems/activerecord-1.15.5/lib/
active_record/connection_adapters/abstract/
connection_specification.rb:195:in `establish_connection'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:235:in `initialize_database'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:92:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:47:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:47:in `run'
from ./ShoppingList/script/../config/../config/environment.rb:13
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/
generate.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from ShoppingList/script/generate:3
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ ll ShoppingList/storage.db
-rw-r--r-- 1 thufir users 2048 Nov 23 03:09 ShoppingList/storage.db
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ cat ShoppingList/config/database.yml -n
1
2 development:
3 tadapter: sqlite3
4 database: storage.db
5
6 test:
7 adapter: sqlite3
8 database: storage-test.db
9
10 production:
11 adapter: sqlite3
12 database: storage.db
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ cat /etc/gentoo-release
Gentoo Base System release 1.12.9
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ date
Fri Nov 23 03:10:24 PST 2007
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ ShoppingList/script/generate controller
ListItems
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 2, col 10:
` tadapter: sqlite3' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:551:in `database_configuration'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:234:in `initialize_database'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:92:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:47:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:47:in `run'
from ./ShoppingList/script/../config/../config/environment.rb:13
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/
generate.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from ShoppingList/script/generate:3
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ cat ShoppingList/config/database.yml
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ ShoppingList/script/generate controller
ListItems
/usr/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 3, col 0:
` database: shopping_development' (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:551:in `database_configuration'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:234:in `initialize_database'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:92:in `process'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:47:in `send'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/
initializer.rb:47:in `run'
from ./ShoppingList/script/../config/../config/environment.rb:13
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from /usr/lib/ruby/gems/1.8/gems/rails-1.2.5/lib/commands/
generate.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from ShoppingList/script/generate:3
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ cat -n ShoppingList/config/database.yml
1
2 development:
3 adapter: mysql
4 database: shopping_development
5 username: root
6 password:
7 host: localhost
8 test:
9 adapter: mysql
10 database: shopping_test
11 username: root
12 password:
13 host: localhost
14
15 production:
16 adapter: mysql
17 database: shopping_production
18 username: root
19 password:
20 host: localhost
21
22
thufir@arrakis ~/rubyCode $
thufir@arrakis ~/rubyCode $ mysql --user=root
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 5
Server version: 5.0.44-log Gentoo Linux mysql-5.0.44
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.