All,
I am working through the ‘depot’ sample application from the
“Pragmatic Programmers” book on my
powerbook. I was going through the install process on
Dan Benjamin
ruby_rails_lighttpd_mysql_tiger and it seemed to work fine.
But when I try to create the first table, I get the following error,
and I have no idea what this means.
Any help would be greatly appreciated!
Thanks
(My database.yml file looks like this:
development:
adapter: mysql
database: depot_development
host: localhost
username: root
password:
=====================
error:
mycomputer:~/Rails/depot dvollmar$ ruby script/generate scaffold Product
Admin
/usr/lib/ruby/1.8/yaml.rb:119:in load': parse error on line 11, col 11:
username: root’ (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:119:in `load’
… lines deleted)
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/
active_support/dependencies.rb:
214:in `require’
from script/generate:3
Kavika V. <kavika@…> writes:
BTW: This happens when I try to start the server:
David-Vollmars-Computer:~/Rails/depot dvollmar$ ruby script/server
=> Booting WEBrick…
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:73:in
`establish_connection’: development database is not configured
(ActiveRecord::AdapterNotSpecified)
from
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/
…
(Using database.yml:
development:
adapter: mysql
database: depot_development
username: root
password: <MY_SQL_PASSWORT>
host: localhost
port: 3306
Could you have a tab before the “username: root” in your YAML file? I
believe you can’t use tags, just spaces. Note the error message has
whitespace between ’ and username.
HTH,
Dean
On 1/14/06, Kavika V. [email protected] wrote:
mycomputer:~/Rails/depot dvollmar$ ruby script/generate scaffold Product Admin
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails
–
Dean W.
http://www.aspectprogramming.com
http://www.newaspects.com
http://www.contract4j.org
Thanks! Indeed removing tabs made that problem go away. Now I get t
the following error when starting webrick or trying to create the
tables.
database.yml
development:
adapter: mysql
database: depot_development
username: root
password: <MY_PASSWORD>
host: localhost
port: 3306
error
David-Vollmars-Computer:~/Rails/depot dvollmar$ ruby script/server
=> Booting WEBrick…
/usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/
connection_adapters/abstract/connection_specification.rb:73:in
establish_connection': development database is not configured (ActiveRecord::AdapterNotSpecified) from /usr/lib/ruby/gems/1.8/gems/activerecord-1.13.2/lib/active_record/ connection_adapters/abstract/connection_specification.rb:66:in
establish_connection’
I am a little bit confused about the ‘socket’ value that shows up in the
default database.yml file.
What should that be? I can not find any explanation for this anywhere.
Thanks!
Ezra Z. <ezra@…> writes:
…
WebMaster
Yakima Herald-Republic Newspaper
ezra@…
509-577-7732
Thanks, I fixed that, now I am getting the dreaded error:
development database is not configured
(ActiveRecord::AdapterNotSpecified)
???
On Jan 13, 2006, at 10:32 PM, Kavika V. wrote:
mycomputer:~/Rails/depot dvollmar$ ruby script/generate scaffold
Product Admin
/usr/lib/ruby/1.8/yaml.rb:119:in load': parse error on line 11, col 11:
username: root’ (ArgumentError)
from /usr/lib/ruby/1.8/yaml.rb:119:in `load’
… lines deleted)
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/
active_support/dependencies.rb:
214:in `require’
from script/generate:3
Kavika-
You have some tab chars in your database.yml. YAML cannot have any
tabs in it. I can see tabs between host: and locathost. Go through
your whole database.yml and get rid of all tabs and extra spaces and
you will be fine.
Cheers-
-Ezra Z.
WebMaster
Yakima Herald-Republic Newspaper
[email protected]
509-577-7732