{"action":"created","issue":{"url":"https://api.github.com/repos/scarfacedeb/mina-unicorn/issues/15","labels_url":"https://api.github.com/repos/scarfacedeb/mina-unicorn/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/scarfacedeb/mina-unicorn/issues/15/comments","events_url":"https://api.github.com/repos/scarfacedeb/mina-unicorn/issues/15/events","html_url":"https://github.com/scarfacedeb/mina-unicorn/issues/15","id":114664894,"number":15,"title":"Using mina/unicorn with rails - where does the rails environment get set?","user":{"login":"pypestream-server","id":15486126,"avatar_url":"https://avatars.githubusercontent.com/u/15486126?v=3","gravatar_id":"","url":"https://api.github.com/users/pypestream-server","html_url":"https://github.com/pypestream-server","followers_url":"https://api.github.com/users/pypestream-server/followers","following_url":"https://api.github.com/users/pypestream-server/following{/other_user}","gists_url":"https://api.github.com/users/pypestream-server/gists{/gist_id}","starred_url":"https://api.github.com/users/pypestream-server/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pypestream-server/subscriptions","organizations_url":"https://api.github.com/users/pypestream-server/orgs","repos_url":"https://api.github.com/users/pypestream-server/repos","events_url":"https://api.github.com/users/pypestream-server/events{/privacy}","received_events_url":"https://api.github.com/users/pypestream-server/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-02T19:17:54Z","updated_at":"2015-11-22T16:04:40Z","closed_at":"2015-11-22T16:04:40Z","body":"When using this with rails, where does the rails environment get set?\r\n\r\nWhen using these tasks, I get unicorn with \"-E deployment\", which is the rack environment. I can't find where the rails environment is set anywhere.\r\n\r\nWhere does this happen?"},"comment":{"url":"https://api.github.com/repos/scarfacedeb/mina-unicorn/issues/comments/158772434","html_url":"https://github.com/scarfacedeb/mina-unicorn/issues/15#issuecomment-158772434","issue_url":"https://api.github.com/repos/scarfacedeb/mina-unicorn/issues/15","id":158772434,"user":{"login":"scarfacedeb","id":706648,"avatar_url":"https://avatars.githubusercontent.com/u/706648?v=3","gravatar_id":"","url":"https://api.github.com/users/scarfacedeb","html_url":"https://github.com/scarfacedeb","followers_url":"https://api.github.com/users/scarfacedeb/followers","following_url":"https://api.github.com/users/scarfacedeb/following{/other_user}","gists_url":"https://api.github.com/users/scarfacedeb/gists{/gist_id}","starred_url":"https://api.github.com/users/scarfacedeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scarfacedeb/subscriptions","organizations_url":"https://api.github.com/users/scarfacedeb/orgs","repos_url":"https://api.github.com/users/scarfacedeb/repos","events_url":"https://api.github.com/users/scarfacedeb/events{/privacy}","received_events_url":"https://api.github.com/users/scarfacedeb/received_events","type":"User","site_admin":false},"created_at":"2015-11-22T16:04:40Z","updated_at":"2015-11-22T16:04:40Z","body":"@pypestream-server I was wrong, mina-unicorn sets `RAILS_ENV` itself.\r\n\r\nIt's using `bundle_prefix` mina variable from [mina/rails](https://github.com/mina-deploy/mina/blob/master/lib%2Fmina%2Frails.rb#L25) that adds `RAILS_ENV=#{rails_env} bundle exec` to `unicorn` command.\r\n\r\nI was able to change `RAILS_ENV` by adding:\r\n```ruby\r\nset :rails_env, :development\r\n```\r\nto my deploy.rb"}}