On Apr 7, 7:52 am, tyliong <[email protected]> wrote:
> I am using the daemons plugin.
>
> I have just one problem how do i add modules from the /lib folder to
> the /lib/daemons/daemon.rb file
>
> eg. /lib/basic_functions.rb
>
> this is the file i want to load in daemon.rb
>
> contents daemon.rb:
>
> #!/usr/bin/env ruby
>
> # You might want to change this
> ENV["RAILS_ENV"] ||= "production"
>
> require File.dirname(__FILE__) + "/../../config/environment"
> #require File.dirname(__FILE__) + "/../../lib/basic_functions.rb"(this
> didn't work)
> #require '../basic_functions.rb' (this didn't work)
>
requiring that file just means that the module BasicFunctions is now
loaded. you haven't done anything with it yet (include BasicFunctions
somewhere might be a good starting point)
Fred
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---