SHARE
TWEET

Untitled

a guest Dec 13th, 2016 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top