{"action":"created","issue":{"url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1107","labels_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1107/labels{/name}","comments_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1107/comments","events_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1107/events","html_url":"https://github.com/sharetribe/sharetribe/issues/1107","id":64811222,"number":1107,"title":"rake assets:precompile fail with aws S3","user":{"login":"Pequi-eu","id":10832444,"avatar_url":"https://avatars.githubusercontent.com/u/10832444?v=3","gravatar_id":"","url":"https://api.github.com/users/Pequi-eu","html_url":"https://github.com/Pequi-eu","followers_url":"https://api.github.com/users/Pequi-eu/followers","following_url":"https://api.github.com/users/Pequi-eu/following{/other_user}","gists_url":"https://api.github.com/users/Pequi-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/Pequi-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pequi-eu/subscriptions","organizations_url":"https://api.github.com/users/Pequi-eu/orgs","repos_url":"https://api.github.com/users/Pequi-eu/repos","events_url":"https://api.github.com/users/Pequi-eu/events{/privacy}","received_events_url":"https://api.github.com/users/Pequi-eu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-03-27T17:26:00Z","updated_at":"2015-04-01T09:20:47Z","closed_at":null,"body":"Hi everyone and first, thanks for the great job to the sharetribe team!\r\n\r\nI deployed Sharetribe on my Mac without any problem and I'm now trying to do it on AWS (EC2 + RDS + S3).\r\nEverything was fine, I just did some modifications (to avoid mistakes) like:\r\n\r\n- add 'mercury/rails’ in config/application.rb\r\n- modified config.assets.compile = false by true in config/environments/production.rb\r\n\r\nI created a 'aws_access_key_id' and a 'aws_secret_access_key' for S3 with the IAM (the user with the id has a complete access to S3)\r\n\r\nI'm now since 2 days at rake assets:precompile, and nothing seems to happen. I have the following:\r\n\r\n----------------------------\r\n[ec2-user@ip-XXX-XXX-XXX sharetribe]$ rake assets:precompile\r\nDigest::Digest is deprecated; use Digest\r\n/usr/local/rvm/rubies/ruby-2.1.2/bin/ruby /usr/local/rvm/gems/ruby-2.1.2/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets\r\nDigest::Digest is deprecated; use Digest\r\nAssetSync: using /home/ec2-user/sharetribe/config/initializers/asset_sync.rb\r\n\r\nAssetSync enabled: false\r\n\r\nUsing the following AssetSync configuration:\r\naws_access_key_id:     XXXXXXXXXXXXXXXXXXXXXXXX\r\naws_secret_access_key: ****************************************\r\nfog_directory:         Not available\r\nfog_provider:          Not available\r\n\r\nDigest::Digest is deprecated; use Digest\r\nAssetSync: using /home/ec2-user/sharetribe/config/initializers/asset_sync.rb\r\n\r\nAssetSync enabled: false\r\n\r\nUsing the following AssetSync configuration:\r\naws_access_key_id:     XXXXXXXXXXXXXXXXXXXXXXXX\r\naws_secret_access_key: ****************************************\r\nfog_directory:         Not available\r\nfog_provider:          Not available\r\n\r\n--------------\r\nThat's all it does, and of course 'rake RAILS_ENV=production jobs:work' does not work after that. I thought it was a S3 mistake so a follow instructions here https://github.com/sharetribe/sharetribe/issues/665 by creating the same CORS. But it still does not work.\r\n\r\nRegarding fog, I don't if I have to specify something and if yes, where ;-).\r\n\r\nIf you have any idea/suggestion, feel free to tell :-)\r\n\r\nThanks a lot"},"comment":{"url":"https://api.github.com/repos/sharetribe/sharetribe/issues/comments/88410161","html_url":"https://github.com/sharetribe/sharetribe/issues/1107#issuecomment-88410161","issue_url":"https://api.github.com/repos/sharetribe/sharetribe/issues/1107","id":88410161,"user":{"login":"Pequi-eu","id":10832444,"avatar_url":"https://avatars.githubusercontent.com/u/10832444?v=3","gravatar_id":"","url":"https://api.github.com/users/Pequi-eu","html_url":"https://github.com/Pequi-eu","followers_url":"https://api.github.com/users/Pequi-eu/followers","following_url":"https://api.github.com/users/Pequi-eu/following{/other_user}","gists_url":"https://api.github.com/users/Pequi-eu/gists{/gist_id}","starred_url":"https://api.github.com/users/Pequi-eu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pequi-eu/subscriptions","organizations_url":"https://api.github.com/users/Pequi-eu/orgs","repos_url":"https://api.github.com/users/Pequi-eu/repos","events_url":"https://api.github.com/users/Pequi-eu/events{/privacy}","received_events_url":"https://api.github.com/users/Pequi-eu/received_events","type":"User","site_admin":false},"created_at":"2015-04-01T09:20:46Z","updated_at":"2015-04-01T09:20:46Z","body":"You're right. The config.yml is made to work with Heroku I presume. So I made the following changes in config.yml:\r\n\r\n- I added: FOG_PROVIDER = AWS\r\n- I added: FOG_DIRECTORY = mybucket\r\n- I deleted: s3_bucket_name\r\n- I added: FOG_REGION = eu-west-1\r\n\r\nin asset_sync.rb I added:\r\n\r\n- fog_region            = app_config.FOG_REGION\r\n- config.fog_region            = fog_region.get\r\n\r\nWith that, it is a little better. Sharetribe is now connecting to S3, but I have a HTTP error 301:\r\nExcon::Errors::MovedPermanently: Expected(200) <=> Actual(301 Moved Permanently)\r\n\r\nI read that it could come from the FOG_REGION, that's why I added it. Without FOG_REGION I have a HTTP error 400, so yes it's better with the FOG_REGION, but still not working. I will continue to search."}}