Ben
Ben

Reputation: 2472

How can I define PATH for Phusion Passenger under nginx with Bundler?

Please forgive my near total ignorance of Ruby, but I am having an issue with Phusion Passenger in that it attempts to run something that relies on $PATH (and blindly assumes it is defined and a string). However, nginx evidently clears out the variable.

Error message:
    private method `split' called for nil:NilClass

...

Backtrace:
#   File                                                       Line  Location
0   /usr/lib64/ruby/gems/1.8/gems/bundler-1.1.0/lib/bundler.rb 254   in `which'

That line reads:

        path = ENV['PATH'].split(File::PATH_SEPARATOR).find do |p|

If there is a workaround for this, I would greatly appreciate it, as I would like to avoid using Apache if at all possible.

Upvotes: 2

Views: 1319

Answers (1)

Jonathan MacDonald
Jonathan MacDonald

Reputation: 875

have you tried setting the path within your nginx config? Something to the effect:

env  PATH=/some/path/expected:/another/path;

See: http://wiki.nginx.org/CoreModule#env

Upvotes: 1

Related Questions