rake db:migrate - Rake aborted!拒绝访问

时间:2015-11-11 05:38:57

标签: mysql ruby-on-rails amazon-web-services gem

我已经尝试了过去6小时网上冲浪没有任何作用。这个部署过去工作正常,我现在无法通过这一步。

当我尝试rake db:migrate或seed时出现以下错误

    rake aborted!
Access Denied
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-1.25.0/lib/aws/core/client.rb:366:in `return_or_raise'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-1.25.0/lib/aws/core/client.rb:467:in `client_request'
(eval):3:in `get_object'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-1.25.0/lib/aws/s3/s3_object.rb:1330:in `get_object'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/aws-sdk-1.25.0/lib/aws/s3/s3_object.rb:1076:in `read'
/Users/Robert/wordyarn-web/app/helpers/error_logger.rb:26:in `initialize_notification_preferences'
/Users/Robert/wordyarn-web/config/initializers/error_notifications.rb:2:in `<top (required)>'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `block in load'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:245:in `load'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/engine.rb:593:in `block (2 levels) in <class:Engine>'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/engine.rb:592:in `each'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/engine.rb:592:in `block in <class:Engine>'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `instance_exec'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/initializable.rb:30:in `run'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `each'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/initializable.rb:54:in `run_initializers'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/application.rb:136:in `initialize!'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/Robert/wordyarn-web/config/environment.rb:5:in `<top (required)>'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `block in require'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:236:in `load_dependency'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/activesupport-3.2.17/lib/active_support/dependencies.rb:251:in `require'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/application.rb:103:in `require_environment!'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/gems/railties-3.2.17/lib/rails/application.rb:305:in `block (2 levels) in initialize_tasks'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `eval'
/Users/Robert/.rvm/gems/ruby-1.9.3-p551/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

无论什么

我都无法工作

这是database-local.yml文件

  development:
  adapter: mysql2
  database: wordyarn_development
  username: root
  password: 
  host: localhost
  socket: /tmp/mysql.sock
  #port: 3306

test:
  adapter: mysql2
  database: wordyarn_test
  username: root
  password: 
  socket: /tmp/mysql.sock
  #port: 3306

production:
  adapter: mysql2
  database: wordyarn_development
  username: root
  password: 
  host: localhost
  socket: /tmp/mysql.sock
  #port: 3306

1 个答案:

答案 0 :(得分:1)

  • 您可以在config/initializer/aws.rb
  • 中找到配置
  • 您似乎遇到了访问错误,请确保以下内容正确无误:
    • access_key_id
    • secret_access_key