Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am going to use thinking sphinx for my application and it requires a conversion to postgresql. I have downloaded both sphinx and postgresql using homebrew, but I am unsure how to convert the rest of the application. I do not care about saving my data, as I only have about 5 records in my database. If there is a step by step guide, or a resource that could guide me I would appreciate it.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

I used the following video from Peter Cooper to figure out what I was doing wrong. If anyone needs to set up Postgresql in the future reference this: http://www.youtube.com/watch?v=pf5jPUJAeU4

share|improve this answer

It's a very simple process if you have stuck to using activerecord and not used any custom SQL.

All you'll need to do is change your gemfile to include gem 'pg' and change the database.yml file to have something like the following:

  development:
    adapter: postgresql
    database: example_development
    username: postgres
    password: secret
    host: localhost
    encoding: UTF8

If you have used custom SQL, you'll just need to convert it to PostgreSQL, which shouldn't be too tricky as it's very similar.

share|improve this answer
    
What about the database line, what do I write for that? –  tomciopp Oct 9 '11 at 22:24
    
drop your existing database and recreate it (using rake db commands) after making changes as suggested by Simon. –  rb512 Oct 9 '11 at 22:31
    
I keep getting password errors, which doesn't make sense to me as I am providing the correct password to sign in to postgresql. I created a new app using postgresql on my system and it ran perfectly. I looked at the database.yml file and it was slightly different than the one provided, copied that format and it still didnt work. Any suggestions? –  tomciopp Oct 9 '11 at 23:44
    
I've updated the example above to include the exact things you'll need to provide. Are you sure you can access login to psql with the exact same username and password settings as the yml file has? –  sren Oct 10 '11 at 9:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.