Advertisement
Guest User

Untitled

a guest
Jul 31st, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. ## If I were to have the following model:
  2.  
  3. class RemoteUser < ActiveRecord::Base
  4.  
  5. self.table_name = "user"
  6.  
  7. ActiveRecord::Base.establish_connection(
  8. :adapter => "mysql",
  9. :host => "example.com",
  10. :username => "user",
  11. :password => "pass",
  12. :database => "database1"
  13. )
  14. end
  15.  
  16. ## shouldn't I be able to interact with it in irb?
  17.  
  18. lol-computer:~/work/restchan user$ script/console
  19. Loading development environment.
  20. >> n = Remote_user.find(1)
  21. LoadError: Expected script/../config/../config/../app/models/remote_user.rb to define Remote_user
  22. from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:239:in `load_missing_constant'
  23. from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:360:in `const_missing'
  24. from ./script/../config/../config/../vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:372:in `const_missing'
  25. from (irb):1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement