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

foreman module exports using the development environment #135

Closed
alekseyg opened this issue Aug 16, 2013 · 1 comment
Closed

foreman module exports using the development environment #135

alekseyg opened this issue Aug 16, 2013 · 1 comment

Comments

@alekseyg
Copy link

When deploying a Rails application with a procfile using the foreman module, the commands are run without setting the environment in any way. I looked through the module code and there is no mention of the environment variable anywhere.

As far as I know, there is no way to set the environment (at least I haven't found it) for foreman other than regular environment variables before running the command. e.g. RAILS_ENV=production bundle exec foreman ... but we should be able to set it somehow when deploying a Rails application.

For example, we could prefix the export_cmd with RAILS_ENV=#{rails_env} if the setting is set in deploy.rb

Currently, my background jobs crash because they attempt to start up using the development environment, but I only have the production environment set up on my server. The only choices I see so far are patching mina's foreman module or running the commands manually.

@alekseyg
Copy link
Author

Actually, it seems prepending the command with RAILS_ENV=production doesn't work with foreman anymore (it used to work for me before on other projects). Using a .env file worked with the latest foreman, but only on the second try. If anything, foreman does interesting things and mina isn't to blame, so I'm closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant