You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
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.rbCurrently, 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.
The text was updated successfully, but these errors were encountered: