# Rails + Postgres + Solaris =?

**URL:** <https://www.ruby-forum.com/t/rails-postgres-solaris/137003>\
**Category:** Rails\
**Created:** [May 8, 2008, 4:37am UTC](https://www.ruby-forum.com/t/rails-postgres-solaris/137003 "2008-05-08T04:37:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hunter\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bc79bd/32.png) [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Post date:** [May 8, 2008, 4:37am UTC](https://www.ruby-forum.com/t/rails-postgres-solaris/137003/1 "2008-05-08T04:37:41Z")

</div>

Hello All,

I’m trying to move an application from Linux to OpenSolaris (Joyent).

Our Rails 2.0.2 app uses PostgreSQL 8 for its main database.

It seems there’s a known bug w/ Postgres and Solaris that requires the  
connections to go through ‘localhost’ instead of using the traditional  
(socket?) connection method.

My database works great with the command line Postgres tools (psql) as  
long as I use the ‘psql -h localhost’ setup.

Well, it’s not working well with Rails.

I have a database.yml that looks like this:

production:  
adapter: postgresql  
database: city2\_production  
host: localhost  
port: 5432  
encoding: latin1  
username: user  
password: pass

But, when Rails attempts to hit the DB, I see this in the log:

PGError (server closed the connection unexpectedly  
This probably means the server terminated abnormally  
before or while processing the request.  
):

I’ve also tried 127.0.0.1 w/o luck.

Anyone run into this? Know the solution? Joyent recommended I come  
here after their forums didn’t help.

I would very much appreciate a point in the right direction.

Thanks,  
Hunter
