views:

18

answers:

0

I have a rails app that uses freetds to establish an ODBC connection into a SQL Server Database. This app is on a server running under mongrel, in theory.

If I start the app with:

sudo mongrel_rails start -e development -p 9000 -d

I get

S1000 (0) [unixODBC][FreeTDS][SQL Server]Unable to connect to data source

However, when run with

sudo mongrel_rails start -e development -p 9000 -d

The application can hit the DB correctly. The freetds.conf and odbc.ini files it's trying to use are readable by everyone, and I can't figure out why the connection seems to fail out when run as sudo. Any input would be greatly appreciated!