I honestly dont understand why or how but it started working when I
replaced

require File.dirname(__FILE__), "/../../config/environment"

with

require File.join(File.dirname(__FILE__), "/../../config/
environment").

There is one other problem now though. When the daemon is running, it
does not output anything to the log file. I can only see its progress
in the development log.
Once the daemon is stopped, it outputs some stuff and a few errors
which make no sense because the daemon runs successfully. (including
"No such file to load activesupport")

My daemon is called reminders_ctl and the log/reminders.rb.log is the
log file im looking into. How do I make it o/p to this log file so
that I can monitor the daemons progress from this one file?


On May 11, 2:07 pm, Ram <yourstruly.vi...@gmail.com> wrote:
> Hi Fred,
>
> I did read about this solution elsewhere before starting this thread.
> So i did
>
> gem 'activesupport', '=2.1.0'
> require 'activesupport'
> require File.join(File.dirname(__FILE__), "/../../config/environment")
>
> But then I got the errors
>
> <LoadError: no such file to load -- active_support>
> <Errno::ENOENT: No such file or directory - /Users/fire/Sites/Vinay/
> ROR/RealApps/fi_rest_auth/log/recurring.rb.pid>
> <NameError: uninitialized constant Repeat> #Repeat being one of the
> models of my app.
>
> Im trying to uninstall activesupport 2.2.2 from my machine but not
> getting anywhere with that either. Even if I DO manage that in my
> local machine, in production, the daemon is still gonna trouble me by
> loading the latest gem versions rt?
>
> On May 11, 1:31 pm, Frederick Cheung <frederick.che...@gmail.com>
> wrote:
>
> > On May 11, 9:00 am, Ram <yourstruly.vi...@gmail.com> wrote:
>
> > > Hi,
>
> > > I have a couple of daemons that im trying to setup to be run for my
> > > app. The environment load is as follows..
>
> > > ENV["RAILS_ENV"] ||= "development"
> > > require File.join(File.dirname(__FILE__), "/../../config/environment")
>
> > > And the error I get is
>
> > > #<LoadError: no such file to load -- active_support>
> > > #<Gem::Exception: can't activate activesupport (= 2.1.0, runtime),
> > > already activated activesupport-2.2.2>
>
> > > I have activesupport 2.2.2, 2.1.0 and 1.4.4 installed and I think it
> > > just loads the latest version available.
> > > How do I force the daemon to load 2.1.0? I understand that in
> > > production too, it loads the latest version of rails and all other
> > > gems available. But I need it to use the versions I specify.
>
> > > Any ideas at all on how to do this?
>
> > you can use gem 'some_gem', '=1.2.3' to force version 1.2.3 of the gem
> > some_gem to be loaded, or you can make sure that whatever is loading
> > activesupport without specifying a version tries to do so after the
> > thing that loads a specific version.
>
> > 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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to