jpw
jpw

Reputation: 19247

rails 3.1.3: rake aborts (couldn't parse YAML) when run first db:migrate (trying to run postgres locally on mac lion)

For a new project I'm trying to run postgres locally.

Mac Lion has Postgres installed (9.1.2). I modified my path in .bash_profile (per another SO thread) so now I have no trouble creating a database or user using the psql utility.

I uninstalled and re-installed the pg gem (0.13.2) using env ARCHFLAGS="-arch x86_64" gem install pg per the excellent blog at http://blog.willj.net/2011/05/31/setting-up-postgresql-for-ruby-on-rails-development-on-os-x/

My Gemfile uses the pg gem for development, test, and production. I've run bundle install.

My database.yml looks like this (and the username and database names are correct and I verified I can access the database fr that username using the psql utility):

development:
 adapter: postgresql
  encoding: unicode
  database: ddchart_development
  pool: 5
  username: ddchart
  password:

(same for test and production, except _test and _production. Password is blank, right?)

When I run bundle exec rake db:migrate it aborts:

rake aborted!
couldn't parse YAML at line 8 column 10

Any help would be appreciated!

Upvotes: 0

Views: 309

Answers (1)

Yanhao
Yanhao

Reputation: 5294

If you pasted the code correctly, there are errors in the code. For example, there's only one space before "adapter", but two before following lines.

In YAML, indentation matters.

Upvotes: 1

Related Questions