passenger is not loading some initializers #188

Closed
FooBarWidget opened this Issue May 29, 2014 · 5 comments

Comments

Projects
None yet
1 participant
Owner

FooBarWidget commented May 29, 2014

From netzdamon on June 11, 2008 07:23:57

What steps will reproduce the problem? 1. touch config/initializers/somefile.rb
2. add code and deploy
3. realize your code is not loaded and cry.

I have yet to figure out why, but some of my initializers fail to load with
passenger and others will load just fine. They all appear to work fine when
developing locally with mongrel.

I have had a configuration initializer for a while now that has worked all
along. Tonight after purchasing ruby enterprise edition that one decided to
just stop working with no errors, while my other ones are still loaded. I
really have no idea how to provide more information, but would be happy to
if I can give you anything useful.

I upgraded to passenger 2.0rc1 the other night as well but it had been
loading fine after that. I have had this problem more than once where an
initializer works fine locally but to get it working with passenger I end
up moving the code into environment.rb.

Sorry for the bad bug report.

Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=87

Owner

FooBarWidget commented May 29, 2014

From honglilai on June 11, 2008 00:31:21

What environment is your application running under, and what's the name of your
initializer file? How do you check whether it's being loaded?

Owner

FooBarWidget commented May 29, 2014

From netzdamon on June 11, 2008 07:03:08

Running the server in production mode. Name of the initializer currently is
configuration.rb. What it does is load a yaml file with some small config items. Then
I print them out in my code like...

%h1= SETTINGS['site_name']

Reason I say its not being loaded is because rails has no idea about the hash
SETTINGS.

Owner

FooBarWidget commented May 29, 2014

From honglilai on July 24, 2008 07:17:15

Can anybody else reproduce this problem?

Owner

FooBarWidget commented May 29, 2014

From scott.matthewman on July 28, 2008 05:18:30

We were encountering the same problem on our server, and traced it down to a missing gem on the server. Once
the gem was installed, the loading of all files in config/initializers worked as normal.

Owner

FooBarWidget commented May 29, 2014

From honglilai on July 30, 2008 01:28:13

Status: Invalid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment