Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 98333
BY: Christian Pennaforte (kikan)
DATE: 2012-09-07 07:46
SUBJECT: Setting NLS_LANG with passenger

 

Hi,

I'm connecting to an Oracle database using oracle_enhanced_adapter + Rails 3.2.8 + passenger+ nginx on a Linux Ubuntu/Debian.

My app worked fine in development mode and even in production mode on my server, but failed when using passenger. The log showed :

Warning: NLS_LANG is not set. fallback to US7ASCII.

The NLS_LANG was set to FRENCH_FRANCE.WE8MSWIN1252 in /etc/environment, but didn't seem to be read.

The solution I found was to add to config/boot.rb this line, just after "require 'rubygems'" :

ENV['NLS_LANG'] ||= 'FRENCH_FRANCE.WE8MSWIN1252'

Now, there's no more error in the log nor in my app :-)


Thread View

Thread Author Date
Setting NLS_LANG with passengerChristian Pennaforte2012-09-07 07:46

Post a followup to this message