Advertisement
Guest User

Untitled

a guest
Aug 1st, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. require 'rubygems'
  2. require_gem 'activerecord'
  3. ActiveRecord::Base.establish_connection(
  4. :adapter => 'mysql',
  5. :host => 'localhost',
  6. :database => 'myproject_development',
  7. :username => 'myusername',
  8. :password => 'mypassword')
  9. # Produces: ./update.rb:24:Warning: require_gem is obsolete. Use gem instead.
  10.  
  11. # Okay so then I change it:
  12. require 'rubygems'
  13. gem 'activerecord'
  14. ActiveRecord::Base.establish_connection(
  15. :adapter => 'mysql',
  16. :host => 'localhost',
  17. :database => 'myproject_development',
  18. :username => 'myusername',
  19. :password => 'mypassword')
  20. # Produces: ./update.rb:33: uninitialized constant ActiveRecord (NameError)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement