Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

postgresql error after installing devise?

In the gist you will see the error, followed by my database.yml and gemfile. No help via google or stackexchange, any suggestions?


8 Answers

Did you run bundle install?

Yeah I did all that. It appears my problem runs deeper. As a test, I created a new app from the command line by running rails new testapp -d postgresql, afterwards I run rake db:create and receive the same error: https://gist.github.com/jziggas/5615952

Although the devise gem is in this gist, I tried all of this before adding the gem as well.

I see that you are using windows, it could be related to your PATHs.

Not really sure how to do this on a windows, but on a linux this is what I would like to know:

gem list pg
which gem

I know I know, linux is just another learning curve I've been avoiding for the time being! Not sure what you mean or what you're asking for, but this is my system path: PATH=C:\Ruby200-x64\bin;C:\Ruby200-x64\bin;C:\windows\system32;C:\windows;C:\win dows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Program Files\nodejs\;C:\cygwin\bin;C:\mingw64\x86_64-w64-mingw 32\bin;C:\mingw64\bin;C:\Program Files (x86)\Heroku\bin;C:\Program Files (x86)\g it\cmd;C:\Program Files\PostgreSQL\9.2\bin;C:\RailsInstaller\Git\cmd;C:\RailsIns taller\Ruby1.9.3\bin;C:\Users\Joshua\AppData\Roaming\npm;C:\mingw64\x86_64-w64-m ingw32\bin

I see that you have two ruby versions installed. 1.9.3 and 2.0.0... and both are on your system path. This means that some gems could be running from one version while others are running from the other, and this is certainly something you don't want happening.

As ruby 2.0 is 99,999% (:P) compatible with 1.9.3, you should remove any reference to ruby 1.9.3 from your system path and try it all again.

Good call, thanks. Removed the old ruby 1.9.3 path reference, but i'm still getting the same error.

Stuff like this that makes me want to quit!

Thanks for all your help, I truly appreciate it. As a workaround, I'm thinking maybe I'll just try using sqlite3 for test/development and leave postgresql for heroku deployment -- what do you think?

If you are not in the mood for fixing this, go with sqlite3 and come back when you are more motivated! :)

Fixing this error might be easier in a couple of days, so move forward with sqlite3.