Advertisement
Guest User

Untitled

a guest
Feb 10th, 2016
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. 1) I created amazon RDS mysql instance at first and assigned the full access authority in security group.<br>
  2. 2) I have created a rails new project using sqlite and deployed it to amazon elastic beanstalk using "eb deploy". Worked well.<br>
  3. 3) In order to use the amazon RDS mysql, I have changed the config/database.yml as the following.<br>
  4.  
  5. production:
  6. adapter: mysql2
  7. encoding: utf8
  8. database: <%= ENV['RDS_DB_NAME'] %>
  9. username: <%= ENV['RDS_USERNAME'] %>
  10. password: <%= ENV['RDS_PASSWORD'] %>
  11. host: <%= ENV['RDS_HOSTNAME'] %>
  12. port: <%= ENV['RDS_PORT'] %>
  13. I have assigned the variables on the tab of configuration in eb instance.<br>
  14. <hr>
  15.  
  16. ERROR: [Instance: i-0c11ecd4] Command failed on instance. Return code: 1 Output: (TRUNCATED)...options.
  17. ============= END WARNING FROM mysql2 =========
  18. rake aborted!
  19. ActiveRecord::NoDatabaseError: Unknown database 'db/production'
  20.  
  21. Mysql2::Error: Unknown database 'db/production'
  22.  
  23. Tasks: TOP => db:migrate
  24. (See full trace by running task with --trace).
  25. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/12_db_migration.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
  26. INFO: Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
  27. ERROR: Unsuccessful command execution on instance id(s) 'i-0c11ecd4'. Aborting the operation.
  28. ERROR: Failed to deploy application.
  29.  
  30. ERROR: Failed to deploy application.
  31.  
  32. I want to know the quick way to fix.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement