Kavika Vollmar
2006-Jan-14 06:40 UTC
[Rails] New problem with Mac OS X + rails + mysql. Please help!
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
Kavika Vollmar
2006-Jan-14 06:56 UTC
[Rails] Re: New problem with Mac OS X + rails + mysql. Please help!
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
Dean Wampler
2006-Jan-14 15:17 UTC
[Rails] New problem with Mac OS X + rails + mysql. Please help!
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:> 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 > > > _______________________________________________ > 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
Kavika Vollmar
2006-Jan-14 16:52 UTC
[Rails] Re: New problem with Mac OS X + rails + mysql. Please help!
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 Zygmuntowicz
2006-Jan-14 16:58 UTC
[Rails] New problem with Mac OS X + rails + mysql. Please help!
On Jan 13, 2006, at 10:32 PM, Kavika Vollmar wrote:> 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:3Kavika- 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
Kavika Vollmar
2006-Jan-14 17:40 UTC
[Rails] Re: New problem with Mac OS X + rails + mysql. Please help!
Ezra Zygmuntowicz <ezra@...> writes: ...> > 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@... > 509-577-7732 >Thanks, I fixed that, now I am getting the dreaded error: development database is not configured (ActiveRecord::AdapterNotSpecified) ???