Forum: Ruby on Rails New problem with Mac OS X + rails + mysql. Please help!

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.
B9842081bcd490b9bbbaa1f3a3143ede?d=identicon&s=25 Kavika Vollmar (Guest)
on 2006-01-14 07:42
(Received via mailing list)
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
 http://hivelogic.com/articles/2005/12/01/
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: <MYSQLROOTPASSWORD>

=====================
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
B9842081bcd490b9bbbaa1f3a3143ede?d=identicon&s=25 Kavika Vollmar (Guest)
on 2006-01-14 07:58
(Received via mailing list)
Kavika Vollmar <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
F690ec04b0501b74b033fc64ff4f682b?d=identicon&s=25 Dean Wampler (Guest)
on 2006-01-14 16:18
(Received via mailing list)
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 Vollmar <kavika@the-dave.com> wrote:
>
> mycomputer:~/Rails/depot dvollmar$ ruby script/generate scaffold Product Admin
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Dean Wampler
http://www.aspectprogramming.com
http://www.newaspects.com
http://www.contract4j.org
B9842081bcd490b9bbbaa1f3a3143ede?d=identicon&s=25 Kavika Vollmar (Guest)
on 2006-01-14 17:53
(Received via mailing list)
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!
8e44c65ac5b896da534ef2440121c953?d=identicon&s=25 Ezra Zygmuntowicz (Guest)
on 2006-01-14 18:02
(Received via mailing list)
On Jan 13, 2006, at 10:32 PM, Kavika Vollmar 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 Zygmuntowicz
WebMaster
Yakima Herald-Republic Newspaper
ezra@yakima-herald.com
509-577-7732
B9842081bcd490b9bbbaa1f3a3143ede?d=identicon&s=25 Kavika Vollmar (Guest)
on 2006-01-14 18:42
(Received via mailing list)
Ezra Zygmuntowicz <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)

???
This topic is locked and can not be replied to.