Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start process with ENV variable set #265

Closed
tomekw opened this issue Sep 21, 2012 · 2 comments
Closed

Unable to start process with ENV variable set #265

tomekw opened this issue Sep 21, 2012 · 2 comments

Comments

@tomekw
Copy link

@tomekw tomekw commented Sep 21, 2012

My Procfile is like this:

web:    bundle exec rails server thin -p $PORT -e $RACK_ENV
worker: NEWRELIC_ENABLE=false bundle exec sidekiq -q default,1

When I try to start foreman locally I get this:

$ rvmsudo foreman start                                                                                                                                                                                                
11:03:19 web.1                                 | started with pid 33605
11:03:19 worker.1                              | started with pid 33606
11:03:19 worker.1                              | /Users/tomek/.rvm/gems/ruby-1.9.3-p194/gems/foreman-0.59.0/bin/foreman-runner: line 41: exec: NEWRELIC_ENABLE=false: not found
11:03:19 system                                | sending SIGTERM to all processes
11:03:19 worker.1                              | exited with code 127
11:03:24 system                                | sending SIGKILL to all processes

On Heroku everything works as expected.

I would be happy to provide more details! Thank you.

@rud

This comment has been minimized.

Copy link

@rud rud commented Sep 25, 2012

You need to use the .env file to set environment variables - or provide a different environment file with -e flag to the foreman invocation.

@ddollar

This comment has been minimized.

Copy link
Owner

@ddollar ddollar commented Sep 25, 2012

The problem is that NEWRELIC_ENABLE=false is not a command, but is instead a shell-ism. If you want an environment for just one command, you can start with the env command:

worker: env NEWRELIC_ENABLE=false bundle exec sidekiq -q default,1
@ddollar ddollar closed this Sep 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.