From philip at prettybycritty.com Mon Sep 22 20:15:48 2008 From: philip at prettybycritty.com (Philip Ingram) Date: Mon, 22 Sep 2008 20:15:48 -0400 Subject: [Railstat-list] rail_stat in rails 2.1 Message-ID: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> Hi there, stumble upon your project. looking forward to using it. I do have a couple of errors however. it appears that in the before_filter you call an @request.xxx in your :extract_subdomain. where exactly does that instance variable @request come from? digging in the lib i couldn't find any reference to it. I can't get past the intial before_filter. and when i disable it, i still get more errors when i'm redirected to /path. however i'll await your answer to the @request variable and where it is set. thanks phil From lubo at manolov.org Sun Sep 28 06:38:56 2008 From: lubo at manolov.org (Luben Manolov) Date: Sun, 28 Sep 2008 13:38:56 +0300 Subject: [Railstat-list] rail_stat in rails 2.1 In-Reply-To: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> References: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> Message-ID: <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> Hi Philip, The problem with the @request and @params variables is fixed in the Git repository (thanks to Simeon Bateman). The github project is located at http://github.com/lmanolov/railstat Please checkout the latest version from git://github.com/lmanolov/railstat.git Best regards, Luben On Tue, Sep 23, 2008 at 3:15 AM, Philip Ingram wrote: > Hi there, > > stumble upon your project. looking forward to using it. I do have a couple > of errors however. > > it appears that in the before_filter you call an @request.xxx in your > :extract_subdomain. where exactly does that instance variable @request come > from? > > digging in the lib i couldn't find any reference to it. > > I can't get past the intial before_filter. and when i disable it, i still > get more errors when i'm redirected to /path. > > however i'll await your answer to the @request variable and where it is set. > thanks > phil > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list > From philip at prettybycritty.com Sun Sep 28 12:54:28 2008 From: philip at prettybycritty.com (Philip Ingram) Date: Sun, 28 Sep 2008 12:54:28 -0400 Subject: [Railstat-list] rail_stat in rails 2.1 In-Reply-To: <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> References: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> Message-ID: <93DD5494-3CE2-481A-8A46-844EDFBF3332@prettybycritty.com> Thanks Luben. To follow up. There is only a plugin now, and not a gem, correct? I was using the gem and hope to do so again, but will use the plugin for now. I've taken the liberty and created a generators/rail_stat/ directory and put all of the template directory and rail_stat_generator.rb script in it, so that script/generate rail_stat works. After all that, I still get an error with the hits on line 31 of the hit.rhtml page, however. the first_hit.datetime is borking in rails 2.1 Is the reason for this error because I need the tzinfo plugin or something?, Rail_stat should work in development shouldn't it? If not, i have a test site i can use. Just curious. thanks, can't wait for the answers back. Phil On 28-Sep-08, at 6:38 AM, Luben Manolov wrote: > Hi Philip, > > The problem with the @request and @params variables is fixed in the > Git repository (thanks to Simeon Bateman). The github project is > located at http://github.com/lmanolov/railstat > > Please checkout the latest version from git://github.com/lmanolov/ > railstat.git > > Best regards, > > Luben > > On Tue, Sep 23, 2008 at 3:15 AM, Philip Ingram > wrote: >> Hi there, >> >> stumble upon your project. looking forward to using it. I do have >> a couple >> of errors however. >> >> it appears that in the before_filter you call an @request.xxx in your >> :extract_subdomain. where exactly does that instance variable >> @request come >> from? >> >> digging in the lib i couldn't find any reference to it. >> >> I can't get past the intial before_filter. and when i disable it, >> i still >> get more errors when i'm redirected to /path. >> >> however i'll await your answer to the @request variable and where >> it is set. >> thanks >> phil >> _______________________________________________ >> Railstat-list mailing list >> Railstat-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/railstat-list >> > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list From philip at prettybycritty.com Sun Sep 28 20:06:57 2008 From: philip at prettybycritty.com (Philip Ingram) Date: Sun, 28 Sep 2008 20:06:57 -0400 Subject: [Railstat-list] rail_stat in rails 2.1 In-Reply-To: <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> References: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> Message-ID: <9DF1CE10-6667-437E-ABE4-617902DEC49A@prettybycritty.com> luben. Sorry i found the tracker_js, but the log says: NoMethodError (undefined method `render_text' for #): /app/controllers/rail_stat_controller.rb:105:in `tracker_js' I'll investigate. thanks On 28-Sep-08, at 6:38 AM, Luben Manolov wrote: > Hi Philip, > > The problem with the @request and @params variables is fixed in the > Git repository (thanks to Simeon Bateman). The github project is > located at http://github.com/lmanolov/railstat > > Please checkout the latest version from git://github.com/lmanolov/ > railstat.git > > Best regards, > > Luben > > On Tue, Sep 23, 2008 at 3:15 AM, Philip Ingram > wrote: >> Hi there, >> >> stumble upon your project. looking forward to using it. I do have >> a couple >> of errors however. >> >> it appears that in the before_filter you call an @request.xxx in your >> :extract_subdomain. where exactly does that instance variable >> @request come >> from? >> >> digging in the lib i couldn't find any reference to it. >> >> I can't get past the intial before_filter. and when i disable it, >> i still >> get more errors when i'm redirected to /path. >> >> however i'll await your answer to the @request variable and where >> it is set. >> thanks >> phil >> _______________________________________________ >> Railstat-list mailing list >> Railstat-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/railstat-list >> > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list From philip at prettybycritty.com Sun Sep 28 20:01:55 2008 From: philip at prettybycritty.com (Philip Ingram) Date: Sun, 28 Sep 2008 20:01:55 -0400 Subject: [Railstat-list] rail_stat in rails 2.1 In-Reply-To: <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> References: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> Message-ID: Hi Luben, Another thing. in the script that we are supposed to paste into the application.html.erb file, there is a reference to a /rail_stat/ tracker.js file. However, my rail_stat generate didn't put one into it. A quick search of the whole code, didn't find it either. Is this a missing file too? thanks Phil. P.s. I fixed the first_hit by adding a <% unless first_hit.blank? %> block. On 28-Sep-08, at 6:38 AM, Luben Manolov wrote: > Hi Philip, > > The problem with the @request and @params variables is fixed in the > Git repository (thanks to Simeon Bateman). The github project is > located at http://github.com/lmanolov/railstat > > Please checkout the latest version from git://github.com/lmanolov/ > railstat.git > > Best regards, > > Luben > > On Tue, Sep 23, 2008 at 3:15 AM, Philip Ingram > wrote: >> Hi there, >> >> stumble upon your project. looking forward to using it. I do have >> a couple >> of errors however. >> >> it appears that in the before_filter you call an @request.xxx in your >> :extract_subdomain. where exactly does that instance variable >> @request come >> from? >> >> digging in the lib i couldn't find any reference to it. >> >> I can't get past the intial before_filter. and when i disable it, >> i still >> get more errors when i'm redirected to /path. >> >> however i'll await your answer to the @request variable and where >> it is set. >> thanks >> phil >> _______________________________________________ >> Railstat-list mailing list >> Railstat-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/railstat-list >> > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list From philip at prettybycritty.com Sun Sep 28 20:23:13 2008 From: philip at prettybycritty.com (Philip Ingram) Date: Sun, 28 Sep 2008 20:23:13 -0400 Subject: [Railstat-list] rail_stat in rails 2.1 In-Reply-To: References: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> Message-ID: i replaced render_text(str) with render :text => (str) this is on line 105. Now it looks like i'll fix the timezone problem next. Once this is done, your plugin will be rails 2.1 ready. i assure you. :-) On 28-Sep-08, at 8:01 PM, Philip Ingram wrote: > Hi Luben, > > Another thing. > > in the script that we are supposed to paste into the > application.html.erb file, there is a reference to a /rail_stat/ > tracker.js file. > > However, my rail_stat generate didn't put one into it. A quick > search of the whole code, didn't find it either. > > Is this a missing file too? > > thanks > Phil. > > P.s. I fixed the first_hit by adding a <% unless first_hit.blank? %> > block. > On 28-Sep-08, at 6:38 AM, Luben Manolov wrote: > >> Hi Philip, >> >> The problem with the @request and @params variables is fixed in the >> Git repository (thanks to Simeon Bateman). The github project is >> located at http://github.com/lmanolov/railstat >> >> Please checkout the latest version from git://github.com/lmanolov/ >> railstat.git >> >> Best regards, >> >> Luben >> >> On Tue, Sep 23, 2008 at 3:15 AM, Philip Ingram >> wrote: >>> Hi there, >>> >>> stumble upon your project. looking forward to using it. I do have >>> a couple >>> of errors however. >>> >>> it appears that in the before_filter you call an @request.xxx in >>> your >>> :extract_subdomain. where exactly does that instance variable >>> @request come >>> from? >>> >>> digging in the lib i couldn't find any reference to it. >>> >>> I can't get past the intial before_filter. and when i disable it, >>> i still >>> get more errors when i'm redirected to /path. >>> >>> however i'll await your answer to the @request variable and where >>> it is set. >>> thanks >>> phil >>> _______________________________________________ >>> Railstat-list mailing list >>> Railstat-list at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/railstat-list >>> >> _______________________________________________ >> Railstat-list mailing list >> Railstat-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/railstat-list > > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list From philip at prettybycritty.com Mon Sep 29 16:13:40 2008 From: philip at prettybycritty.com (Philip Ingram) Date: Mon, 29 Sep 2008 16:13:40 -0400 Subject: [Railstat-list] rail_stat in rails 2.1 In-Reply-To: References: <15FFC22A-20BF-462F-B9DA-401B9D9F1715@prettybycritty.com> <5ad854c30809280338v66dded7bqde372e2d7918b75a@mail.gmail.com> Message-ID: <67294D0B-7AA1-4C3A-8164-47FF7CAC869C@prettybycritty.com> So I'm not sure if this helps, but it works. I changed the following: rail_stat_helper.rb Line 166 changed to : ts = Time.parse(t.to_s) #Time.at wasnt' working for me, as it needs to be in seconds, and the parse can take the string from the DB, as is. rail_stat.rb model Line 65 changed to : Time.parse(self.created_at.to_s) #same reasoning. I'm not sure if the times are working, but I'll take it. I can navigate through all the sites unscathed now. I'm probably going to add this to my open source social networking project Touque_Dog_core, found on github too: http://github.com/nerbie69/touque_dog_core/tree/master Let me know if this gets back to being a gem or not. thanks for your work Phil On 28-Sep-08, at 8:23 PM, Philip Ingram wrote: > i replaced render_text(str) with render :text => (str) > > this is on line 105. > > Now it looks like i'll fix the timezone problem next. > > Once this is done, your plugin will be rails 2.1 ready. i assure > you. :-) > On 28-Sep-08, at 8:01 PM, Philip Ingram wrote: > >> Hi Luben, >> >> Another thing. >> >> in the script that we are supposed to paste into the >> application.html.erb file, there is a reference to a /rail_stat/ >> tracker.js file. >> >> However, my rail_stat generate didn't put one into it. A quick >> search of the whole code, didn't find it either. >> >> Is this a missing file too? >> >> thanks >> Phil. >> >> P.s. I fixed the first_hit by adding a <% unless first_hit.blank? >> %> block. >> On 28-Sep-08, at 6:38 AM, Luben Manolov wrote: >> >>> Hi Philip, >>> >>> The problem with the @request and @params variables is fixed in the >>> Git repository (thanks to Simeon Bateman). The github project is >>> located at http://github.com/lmanolov/railstat >>> >>> Please checkout the latest version from git://github.com/lmanolov/ >>> railstat.git >>> >>> Best regards, >>> >>> Luben >>> >>> On Tue, Sep 23, 2008 at 3:15 AM, Philip Ingram >>> wrote: >>>> Hi there, >>>> >>>> stumble upon your project. looking forward to using it. I do >>>> have a couple >>>> of errors however. >>>> >>>> it appears that in the before_filter you call an @request.xxx in >>>> your >>>> :extract_subdomain. where exactly does that instance variable >>>> @request come >>>> from? >>>> >>>> digging in the lib i couldn't find any reference to it. >>>> >>>> I can't get past the intial before_filter. and when i disable >>>> it, i still >>>> get more errors when i'm redirected to /path. >>>> >>>> however i'll await your answer to the @request variable and where >>>> it is set. >>>> thanks >>>> phil >>>> _______________________________________________ >>>> Railstat-list mailing list >>>> Railstat-list at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/railstat-list >>>> >>> _______________________________________________ >>> Railstat-list mailing list >>> Railstat-list at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/railstat-list >> >> _______________________________________________ >> Railstat-list mailing list >> Railstat-list at rubyforge.org >> http://rubyforge.org/mailman/listinfo/railstat-list > > _______________________________________________ > Railstat-list mailing list > Railstat-list at rubyforge.org > http://rubyforge.org/mailman/listinfo/railstat-list