{"action":"created","issue":{"url":"https://api.github.com/repos/churchio/onebody/issues/423","labels_url":"https://api.github.com/repos/churchio/onebody/issues/423/labels{/name}","comments_url":"https://api.github.com/repos/churchio/onebody/issues/423/comments","events_url":"https://api.github.com/repos/churchio/onebody/issues/423/events","html_url":"https://github.com/churchio/onebody/pull/423","id":56906893,"number":423,"title":"WIP Heroku: DO NOT MERGE","user":{"login":"aunderwo","id":423,"avatar_url":"https://avatars.githubusercontent.com/u/423?v=3","gravatar_id":"","url":"https://api.github.com/users/aunderwo","html_url":"https://github.com/aunderwo","followers_url":"https://api.github.com/users/aunderwo/followers","following_url":"https://api.github.com/users/aunderwo/following{/other_user}","gists_url":"https://api.github.com/users/aunderwo/gists{/gist_id}","starred_url":"https://api.github.com/users/aunderwo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aunderwo/subscriptions","organizations_url":"https://api.github.com/users/aunderwo/orgs","repos_url":"https://api.github.com/users/aunderwo/repos","events_url":"https://api.github.com/users/aunderwo/events{/privacy}","received_events_url":"https://api.github.com/users/aunderwo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/churchio/onebody/labels/in%20progress","name":"in progress","color":"f012be"},{"url":"https://api.github.com/repos/churchio/onebody/labels/wip","name":"wip","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-02-07T10:44:10Z","updated_at":"2015-02-08T00:45:17Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/churchio/onebody/pulls/423","html_url":"https://github.com/churchio/onebody/pull/423","diff_url":"https://github.com/churchio/onebody/pull/423.diff","patch_url":"https://github.com/churchio/onebody/pull/423.patch"},"body":"Hi\r\nI've managed to get onebody working on heroku but there were quite a few changes that may not fit with recent commits\r\n\r\nFirst locally I ran the following command as a user that had permissions to make a pg user\r\n```\r\ncreateuser  --no-adduser onebody\r\nrake db:create db:migrate db:schema:load db:seed\r\n```\r\nchecked that this was working locally and then made changes necessary for heroku\r\n  1.   Gemfile.lock needs to be in the repo si added this\r\n  2.   pg gem needs to specified explicitly in Gemfile rather than wrapped in the block that determines the db flavour from database.yml\r\n  3.   added the ENV variable SERVE_ASSETS to heroku `heroku config:set SERVE_ASSETS='true'` in order to get assets to be served by rails\r\n  4.   corrected a Mysql-specific exception that was causing asset compilation to fail\r\n  5.   secrets.yml needed to be in the repo so used ENV variables to define these\r\n\r\n    ```\r\n    production:\r\n        secret_token: <%= ENV['SECRET_TOKEN'] %>\r\n        secret_key_base: <%= ENV['SECRET_KEY_BASE'] %>\r\n    ```\r\n Again used `heroku config set X='Y'`\r\n  6.   added S3-specific configs to production.rb. AWS keys and buckets used ENV variables\r\n\r\n    ```\r\n    :s3_credentials => {\r\n      :bucket => ENV['S3_BUCKET_NAME'],\r\n      :access_key_id => ENV['AWS_ACCESS_KEY_ID'],\r\n      :secret_access_key => ENV['AWS_SECRET_ACCESS_KEY']\r\n    ```\r\n Again used `heroku config set X='Y'`\r\n  7.   added specific version of aws-sdk `gem 'aws-sdk', '~> 1.5.7'`\r\n\r\nAll is working well including image uploads. However not sure how this code should be used whilst not breaking the 'normal' Mysql-based install.\r\nSuggestions welcome\r\n"},"comment":{"url":"https://api.github.com/repos/churchio/onebody/issues/comments/73390984","html_url":"https://github.com/churchio/onebody/pull/423#issuecomment-73390984","issue_url":"https://api.github.com/repos/churchio/onebody/issues/423","id":73390984,"user":{"login":"ZucchiniZe","id":5256942,"avatar_url":"https://avatars.githubusercontent.com/u/5256942?v=3","gravatar_id":"","url":"https://api.github.com/users/ZucchiniZe","html_url":"https://github.com/ZucchiniZe","followers_url":"https://api.github.com/users/ZucchiniZe/followers","following_url":"https://api.github.com/users/ZucchiniZe/following{/other_user}","gists_url":"https://api.github.com/users/ZucchiniZe/gists{/gist_id}","starred_url":"https://api.github.com/users/ZucchiniZe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZucchiniZe/subscriptions","organizations_url":"https://api.github.com/users/ZucchiniZe/orgs","repos_url":"https://api.github.com/users/ZucchiniZe/repos","events_url":"https://api.github.com/users/ZucchiniZe/events{/privacy}","received_events_url":"https://api.github.com/users/ZucchiniZe/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T00:45:17Z","updated_at":"2015-02-08T00:45:17Z","body":"I could rebase/merge it every once it a while to make sure it stays up with `master`"}}