Guest User

Untitled

a guest
Nov 28th, 2018
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. # Change the adapter. But this is not right.
  2.  
  3. # Path to the database.yml
  4. #
  5. active_record_config = File.expand_path('../../', __FILE__)
  6. config = YAML.load_file(File.join(active_record_config, 'config/database.yml'))[ENV['GOLIATH_ENV']]
  7.  
  8. # Changing the adapter from 'em_mysql2' to 'mysql2'. But this is not right.
  9. #
  10. ActiveRecord::Base.establish_connection(:adapter => 'mysql2',
  11. :database => config['database'],
  12. :username => config['username'],
  13. :password => config['password'],
  14. :host => config['host'],
  15. :pool => config['pool'])
Add Comment
Please, Sign In to add comment