On Dec 17, 2010, at 9:02 AM, Michael Satterwhite wrote: > In the past, I've used mysql with rails without problem. I need to work > with postgresql, but I'm having trouble getting it working. I've seen > conflicting reports on what gems are needed. My latest install was > > sudo gem install postgres -- > --with-pgsql-include-dir=/Library/PostgreSQL8/include > --with-pgsql-lib-dir=/Library/PostgreSQL8/lib > > (note: I did this blindly. It's about my 6th try to get proper gems in > place)
Not your error, but for what it's worth, I'm using the 'pg' gem without any issues. > I'm running Rails 2.3.8 and PostgreSQL 8.4.2 > > My .yml configuration is > development: > adapter: postgresql > database: movies > username: michael2 > port: 5432 > allow_concurrency: true > encoding: SQL_ASCII > > When I try to do a test connect with rake db:migrate, I get the > following: > > rake db:migrate --trace > (in /oldhome/michael/projects/movies) > ** Invoke db:migrate (first_time) > ** Invoke environment (first_time) > ** Execute environment > rake aborted! > syntax error on line 3, col 9: ` adapter: postgresql' > /usr/lib/ruby/1.8/yaml.rb:133:in `load' > /usr/lib/ruby/1.8/yaml.rb:133:in `load' > --------- > > Can anyone offer some help? Thanks much Rails is failing on a syntax error in your database.yml file. It has nothing to do with PostgreSQL at this point. My guess is that instead of two leading spaces on that line you've got a tab. Or some other unicode character pretending to be a space... Fix that and see what happens... -philp -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

