Advertisement
Guest User

Untitled

a guest
Dec 13th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Rails.env.production? ? (env = "production") : (env = "development")
  2. dbconfig = YAML::load(File.open('config/database.yml'))[env]
  3. ActiveRecord::Base.establish_connection(dbconfig)
  4.  
  5. ArgumentError: syntax error on line 17, col 0: `adapter = uri.scheme'
  6. from /usr/local/lib/ruby/1.9.1/syck.rb:135:in `load'
  7.  
  8. development:
  9. adapter: sqlite3
  10. database: db/development.sqlite3
  11. pool: 5
  12. timeout: 5000
  13.  
  14. test:
  15. adapter: sqlite3
  16. database: db/test.sqlite3
  17. pool: 5
  18. timeout: 5000
  19.  
  20. production:
  21. adapter: postgresql
  22. encoding: unicode
  23. database: foo
  24. port: 5432
  25. host: foobar.amazonaws.com
  26. username: foo
  27. password: bar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement