{"action":"closed","issue":{"url":"https://api.github.com/repos/airbrake/airbrake/issues/417","labels_url":"https://api.github.com/repos/airbrake/airbrake/issues/417/labels{/name}","comments_url":"https://api.github.com/repos/airbrake/airbrake/issues/417/comments","events_url":"https://api.github.com/repos/airbrake/airbrake/issues/417/events","html_url":"https://github.com/airbrake/airbrake/issues/417","id":106230681,"number":417,"title":"Airbrake is not respecting configured environment name in capistrano deploys","user":{"login":"sakirtemel","id":939344,"avatar_url":"https://avatars.githubusercontent.com/u/939344?v=3","gravatar_id":"","url":"https://api.github.com/users/sakirtemel","html_url":"https://github.com/sakirtemel","followers_url":"https://api.github.com/users/sakirtemel/followers","following_url":"https://api.github.com/users/sakirtemel/following{/other_user}","gists_url":"https://api.github.com/users/sakirtemel/gists{/gist_id}","starred_url":"https://api.github.com/users/sakirtemel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sakirtemel/subscriptions","organizations_url":"https://api.github.com/users/sakirtemel/orgs","repos_url":"https://api.github.com/users/sakirtemel/repos","events_url":"https://api.github.com/users/sakirtemel/events{/privacy}","received_events_url":"https://api.github.com/users/sakirtemel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-13T18:12:54Z","updated_at":"2015-11-13T04:27:42Z","closed_at":"2015-11-13T04:27:42Z","body":"I'm using a single environment both for staging and production. I've configured custom environment name 'staging' and 'production' in airbrake.rb.\r\nhttps://github.com/airbrake/airbrake/wiki/Customizing-your-airbrake.rb#set-a-custom-environment-name\r\n`\r\nconfig.environment_name = \"staging\"\r\n`\r\n\r\nThis works ok, but the problem is when I do the deployments, Rails.env is used to get the current environment, I think custom environment name should be used instead of Rails.env there.\r\n\r\nhttps://github.com/airbrake/airbrake/blob/master/lib/airbrake/tasks/airbrake.cap#L15\r\n`\r\nairbrake_env = fetch(:airbrake_env, fetch(:rails_env, fetch(:stage)))\r\n`"}}