Guest User

Untitled

a guest
Apr 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. RAILS_ENV = 'production'
  2.  
  3.  
  4.  
  5.  
  6.  
  7. # exit if another bot is already active
  8.  
  9. $: << RAILS_ROOT << RAILS_ROOT+'/vendor/plugins/acts_as_sphinx/lib' << RAILS_ROOT+'/lib/ircbot'
  10.  
  11.  
  12.  
  13. require 'rubygems'
  14.  
  15. require 'active_record'
  16.  
  17. require 'vendor/plugins/acts_as_sphinx/lib/acts_as_sphinx.rb'
  18.  
  19. require 'config/environment.rb'
  20.  
  21. require 'bot'
  22.  
  23. require 'xmlrpc/client'
  24.  
  25. connection = YAML::load(open(RAILS_ROOT+'/config/database.yml'))[RAILS_ENV]
  26.  
  27. ActiveRecord::Base.establish_connection(connection)
  28.  
  29. Dir[RAILS_ROOT+"/app/models/irc*"].each {|m| require m}
  30.  
  31. Dir[RAILS_ROOT+"/app/models/rss_feed*"].each {|m| require m}
Add Comment
Please, Sign In to add comment