Trouble with `rake db:migrate` and AWS S3

Update 2015-01-26 06:55 UTC : rake db:migrate works well now, this problem is caused by invalid format strings in yaml file.

I’ve already check my database connection information again and again, but it still return:

Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)
I, [2015-01-22T16:48:54.272049 #41]  INFO -- : gem install omniauth-qq -v 0.3.0 -i /var/www/discourse/plugins/qq_connect/gems/2.0.0 --no-document --ignore-dependencies
Successfully installed omniauth-qq-0.3.0
1 gem installed
gem install omniauth-weibo-oauth2 -v 0.4.0 -i /var/www/discourse/plugins/weibo-login/gems/2.0.0 --no-document --ignore-dependencies
Successfully installed omniauth-weibo-oauth2-0.4.0
1 gem installed



FAILED
--------------------
RuntimeError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 5678 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"bundle_exec", "cmd"=>["su discourse -c 'bundle install --deployment --verbose --without test --without development'", "su discourse -c 'bundle exec rake db:migrate'", "su discourse -c 'bundle exec rake assets:precompile'"]}
f86048f46d73adda6552bf9f6512842c051fbf6b7aa87cbe47e667c28817ab60
FAILED TO BOOTSTRAP

Is there anyone can help me?

Yeah, please remove all plugins and try again. I suspect you have an incompatible plugin.

But it works well on standalone

Which multisite guide are you using, I nuked an old one

Just follow up the sample/web_only.yml, not use any guide.

Update 2015-01-25 19:40 UTC : AWS S3 works well now, just grant full access to the IAM user for S3.

And for AWS S3, users can’t upload any files with my setting, I’ve already tried both of IAM key and Root key.

It returned ( get from log/production.log ):

Started POST "/uploads" for 205.251.211.116 at 2015-01-25 18:54:25 +0000
Processing by UploadsController#create as JSON
  Parameters: {"files"=>[#<ActionDispatch::Http::UploadedFile:0x0000000b275e10 @tempfile=#<Tempfile:/tmp/RackMultipart20150125-1151-y6gttn>, @original_filename="123.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"files[]\"; filename=\"123.jpg\"\r\nContent-Type: image/jpeg\r\n">]}
Completed 500 Internal Server Error in 1104ms

NoMethodError (undefined method `captures' for nil:NilClass):
  lib/s3_helper.rb:74:in `get_or_create_directory'
  lib/s3_helper.rb:25:in `upload'
  lib/file_store/s3_store.rb:89:in `store_file'
  lib/file_store/s3_store.rb:15:in `store_upload'
  app/models/upload.rb:112:in `create_for'
  app/controllers/uploads_controller.rb:9:in `create'
  lib/middleware/anonymous_cache.rb:119:in `call'
  config/initializers/quiet_logger.rb:10:in `call_with_quiet_assets'
  config/initializers/silence_logger.rb:26:in `call'