picardo picardo - 1 month ago 4x
Ruby Question

How can I require libraries in your Rails directory from the console?

I have a script called query.rb in my lib directory. I want to require it so I can run it from the Rails console. I wonder if this is possible. The script work fine from within the application, so I know it's well formed and functional.

cam cam
require "#{RAILS_ROOT}/lib/query"