Re: script/console connection works, but Rails app fails with SQL Server

Justin Williams
Mon, 17 Dec 2007 21:00:14 -0000

To follow up on this one for the googlers, adding this as an
initializer to my project seems to fix it.

if ENV[''RAILS_ENV''] == ''production''
  ENV[''ODBCINI'']      = "/etc/odbc.ini"
  ENV[''ODBCSYSINI'']   = "/etc"
  ENV[''FREETDSCONF'']  = "/etc/freetds/freetds.conf"
end

The problem is that mongrel_cluster is started as root and then spawns
mongrels as deploy- but doesn''t load environment variables

--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---