Kaushik katari wrote:> Hi,
> I have a file called dbcon.rb that I put in the config directory.
>
> I want to call it from rake, and I was using
> require ''config/dbcon.rb''
>
> This was allowing me to access the classes in this file.
>
> Somehow, the require command cannot find this file anymore. Is there a
> path convention in rails? How do I use require from different parts of
> my application?
You could move it to the lib directory, or write
require "#{RAILS_ROOT}/config/dbcon.rb"
--
Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---