-
Notifications
You must be signed in to change notification settings - Fork 143
Rails environement not loaded #141
Comments
Do you load the the rails environment somewhere? require File.expand_path('../../config/environment', __FILE__) |
I tried adding this line on tope of the .rf config file (after the other require).
Result is the same : Rails.env returns "development" although I use RAILS_ENV=production |
Just figured out that, this is already done by mailman: https://github.com/mailman/mailman/blob/master/lib/mailman/application.rb#L60 And the log you provided reflects the same. As this looks sane I don't know why it loads the wrong environment. You could add a |
in here same problem, please how to run in production environment? |
I had the same issue. Setting the rails environment with Centos 5.8 |
Hey.
Any idea why it is occuring? |
I have problems running mailman correctly in production as the the Rails environnement is not loaded properly.
The mailman log show that rails is found and loaded :
But then, I see errors in the log when processing email : the Rails model are loaded using the development database instead of production.
I tried adding a simple 'puts Rails.env' in the application code and indeed, "development" is returned.
Command used to launch mailman :
RAILS_ENV=production bundle exec mailman -c mailman/mailman-config.rb
mailman/mailman-config.rb:
The text was updated successfully, but these errors were encountered: