I pre-compiled my app to use in production mode. And after that it started to perform every action twice. I am not able to resolve it. My log comes something like this. Started GET "/assets/lowpro.js?body=1&_=1343203450861" for 127.0.0.1 at Wed> Jul 25 13:34:10 +0530 2012 > Served asset /lowpro.js - 200 OK (2ms) > > > Started GET "/assets/lowpro.js?body=1&_=1343203450915" for 127.0.0.1 at > Wed Jul 25 13:34:10 +0530 2012 > Served asset /lowpro.js - 200 OK (0ms) > > > Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 > Processing by ContactsController#index as JS > User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username > =''sumit'') LIMIT 1 > Redirected to http://localhost:3000/logout > Filter chain halted as :deny_multiple_login rendered or redirected > Completed 302 Found in 2ms (ActiveRecord: 0.2ms) > > > Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 > Processing by ContactsController#index as JS > User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username > =''sumit'') LIMIT 1 > Redirected to http://localhost:3000/logout > Filter chain halted as :deny_multiple_login rendered or redirected > Completed 302 Found in 2ms (ActiveRecord: 0.2ms) > > > Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 > Processing by UserController#logout as JS > Redirected to http://localhost:3000/ > Completed 302 Found in 1ms (ActiveRecord: 0.0ms) > > > Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 > Processing by UserController#logout as JS > Redirected to http://localhost:3000/ > Completed 302 Found in 2ms (ActiveRecord: 0.0ms) > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/93VAiSpRr3EJ. For more options, visit https://groups.google.com/groups/opt_out.
On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote:> > I pre-compiled my app to use in production mode. And after that it started > to perform every action twice. I am not able to resolve it. My log comes > something like this. > >You might need to describe your production setup in a little more detail if you want people to be able to workout what is going wrong. Fred> > Started GET "/assets/lowpro.js?body=1&_=1343203450861" for 127.0.0.1 at >> Wed Jul 25 13:34:10 +0530 2012 >> Served asset /lowpro.js - 200 OK (2ms) >> >> >> Started GET "/assets/lowpro.js?body=1&_=1343203450915" for 127.0.0.1 at >> Wed Jul 25 13:34:10 +0530 2012 >> Served asset /lowpro.js - 200 OK (0ms) >> >> >> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >> Processing by ContactsController#index as JS >> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >> =''sumit'') LIMIT 1 >> Redirected to http://localhost:3000/logout >> Filter chain halted as :deny_multiple_login rendered or redirected >> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >> >> >> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >> Processing by ContactsController#index as JS >> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >> =''sumit'') LIMIT 1 >> Redirected to http://localhost:3000/logout >> Filter chain halted as :deny_multiple_login rendered or redirected >> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >> >> >> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >> Processing by UserController#logout as JS >> Redirected to http://localhost:3000/ >> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >> >> >> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >> Processing by UserController#logout as JS >> Redirected to http://localhost:3000/ >> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >> >> >> >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. For more options, visit https://groups.google.com/groups/opt_out.
I am currently running my app in development mode. This log is of development mode. Am not able to deduce what exactly went wrong. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 14:53, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: >> >> I pre-compiled my app to use in production mode. And after that it >> started to perform every action twice. I am not able to resolve it. My log >> comes something like this. >> >> > You might need to describe your production setup in a little more detail > if you want people to be able to workout what is going wrong. > > Fred > >> >> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for 127.0.0.1 >>> at Wed Jul 25 13:34:10 +0530 2012 >>> Served asset /lowpro.js - 200 OK (2ms) >>> >>> >>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for 127.0.0.1 >>> at Wed Jul 25 13:34:10 +0530 2012 >>> Served asset /lowpro.js - 200 OK (0ms) >>> >>> >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>> Processing by ContactsController#index as JS >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>> =''sumit'') LIMIT 1 >>> Redirected to http://localhost:3000/logout >>> Filter chain halted as :deny_multiple_login rendered or redirected >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>> >>> >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>> Processing by ContactsController#index as JS >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>> =''sumit'') LIMIT 1 >>> Redirected to http://localhost:3000/logout >>> Filter chain halted as :deny_multiple_login rendered or redirected >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>> >>> >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>> Processing by UserController#logout as JS >>> Redirected to http://localhost:3000/ >>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >>> >>> >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>> Processing by UserController#logout as JS >>> Redirected to http://localhost:3000/ >>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >>> >>> >>> >> -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I am thinking along the lines: why 2 requests? Why not 3, or 4, or an infinite loop? You mentioned you "pre-compiled" it as a preparation to deploy I guess. Can you tell more about what that exactly means in your case? Basically it looks like your rails app is receiving two requests one after the other; though you can see from timestamps of first pair of requests it''s not exactly duplicated requests: Started GET "/assets/lowpro.js?body=1&_=1343203450861" Started GET "/assets/lowpro.js?body=1&_=1343203450915" You might be running two web servers that both might be forwarding requests to the app, or you misconfigured something: either for your web server (i.e. Apache), or you used some too-clever before filters logic that only redirect one. Does the latter ring a bell? Are you counting login/access county at all (this would likely be an app level before filter because of quite a few different actions being affected). 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> I am currently running my app in development mode. This log is of > development mode. Am not able to deduce what exactly went wrong. > > Regards > Sumit Srivastava > > The power of imagination makes us infinite... > > > > On 25 July 2012 14:53, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: > >> >> >> On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: >>> >>> I pre-compiled my app to use in production mode. And after that it >>> started to perform every action twice. I am not able to resolve it. My log >>> comes something like this. >>> >>> >> You might need to describe your production setup in a little more detail >> if you want people to be able to workout what is going wrong. >> >> Fred >> >>> >>> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for 127.0.0.1 >>>> at Wed Jul 25 13:34:10 +0530 2012 >>>> Served asset /lowpro.js - 200 OK (2ms) >>>> >>>> >>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for 127.0.0.1 >>>> at Wed Jul 25 13:34:10 +0530 2012 >>>> Served asset /lowpro.js - 200 OK (0ms) >>>> >>>> >>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>>> Processing by ContactsController#index as JS >>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>> =''sumit'') LIMIT 1 >>>> Redirected to http://localhost:3000/logout >>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>> >>>> >>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>>> Processing by ContactsController#index as JS >>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>> =''sumit'') LIMIT 1 >>>> Redirected to http://localhost:3000/logout >>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>> >>>> >>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>> Processing by UserController#logout as JS >>>> Redirected to http://localhost:3000/ >>>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >>>> >>>> >>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>> Processing by UserController#logout as JS >>>> Redirected to http://localhost:3000/ >>>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >>>> >>>> >>>> >>> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To view this discussion on the web visit >> https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I do have before_filter and to make sure they aren''t messing up things, I ran my app after removing them but nothing changed. The same code was running fine earlier but now I am not able to get where it has got problem. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:09, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am thinking along the lines: why 2 requests? Why not 3, or 4, or an > infinite loop? You mentioned you "pre-compiled" it as a preparation to > deploy I guess. Can you tell more about what that exactly means in your > case? Basically it looks like your rails app is receiving two requests one > after the other; though you can see from timestamps of first pair of > requests it''s not exactly duplicated requests: > > Started GET "/assets/lowpro.js?body=1&_=1343203450861" > Started GET "/assets/lowpro.js?body=1&_=1343203450915" > > You might be running two web servers that both might be forwarding > requests to the app, or you misconfigured something: either for your web > server (i.e. Apache), or you used some too-clever before filters logic that > only redirect one. Does the latter ring a bell? Are you counting > login/access county at all (this would likely be an app level before filter > because of quite a few different actions being affected). > > > > 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> I am currently running my app in development mode. This log is of >> development mode. Am not able to deduce what exactly went wrong. >> >> Regards >> Sumit Srivastava >> >> The power of imagination makes us infinite... >> >> >> >> On 25 July 2012 14:53, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >> >>> >>> >>> On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: >>>> >>>> I pre-compiled my app to use in production mode. And after that it >>>> started to perform every action twice. I am not able to resolve it. My log >>>> comes something like this. >>>> >>>> >>> You might need to describe your production setup in a little more detail >>> if you want people to be able to workout what is going wrong. >>> >>> Fred >>> >>>> >>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for 127.0.0.1 >>>>> at Wed Jul 25 13:34:10 +0530 2012 >>>>> Served asset /lowpro.js - 200 OK (2ms) >>>>> >>>>> >>>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for >>>>> 127.0.0.1 at Wed Jul 25 13:34:10 +0530 2012 >>>>> Served asset /lowpro.js - 200 OK (0ms) >>>>> >>>>> >>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>>>> Processing by ContactsController#index as JS >>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>> =''sumit'') LIMIT 1 >>>>> Redirected to http://localhost:3000/logout >>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>> >>>>> >>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>>>> Processing by ContactsController#index as JS >>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>> =''sumit'') LIMIT 1 >>>>> Redirected to http://localhost:3000/logout >>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>> >>>>> >>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>>> Processing by UserController#logout as JS >>>>> Redirected to http://localhost:3000/ >>>>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >>>>> >>>>> >>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>>> Processing by UserController#logout as JS >>>>> Redirected to http://localhost:3000/ >>>>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >>>>> >>>>> >>>>> >>>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To view this discussion on the web visit >>> https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
So what did you do exactly to "compile" the code. I mean it is pretty clear that the answer lighs there. Just BTW have you tried simply restarting your machine, or checked that there are no renegade Rails server processes running? But most important are the steps that you took to make a working project break :) Please take some time to explain what you did when you realized "OK, it''s ready for prod, I better compile it". 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> I do have before_filter and to make sure they aren''t messing up things, I > ran my app after removing them but nothing changed. The same code was > running fine earlier but now I am not able to get where it has got problem. > > > Regards > Sumit Srivastava > > The power of imagination makes us infinite... > > > On 25 July 2012 15:09, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> I am thinking along the lines: why 2 requests? Why not 3, or 4, or an >> infinite loop? You mentioned you "pre-compiled" it as a preparation to >> deploy I guess. Can you tell more about what that exactly means in your >> case? Basically it looks like your rails app is receiving two requests one >> after the other; though you can see from timestamps of first pair of >> requests it''s not exactly duplicated requests: >> >> Started GET "/assets/lowpro.js?body=1&_=1343203450861" >> Started GET "/assets/lowpro.js?body=1&_=1343203450915" >> >> You might be running two web servers that both might be forwarding >> requests to the app, or you misconfigured something: either for your web >> server (i.e. Apache), or you used some too-clever before filters logic that >> only redirect one. Does the latter ring a bell? Are you counting >> login/access county at all (this would likely be an app level before filter >> because of quite a few different actions being affected). >> >> >> >> 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >>> I am currently running my app in development mode. This log is of >>> development mode. Am not able to deduce what exactly went wrong. >>> >>> Regards >>> Sumit Srivastava >>> >>> The power of imagination makes us infinite... >>> >>> >>> >>> On 25 July 2012 14:53, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>> >>>> >>>> >>>> On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: >>>>> >>>>> I pre-compiled my app to use in production mode. And after that it >>>>> started to perform every action twice. I am not able to resolve it. My log >>>>> comes something like this. >>>>> >>>>> >>>> You might need to describe your production setup in a little more >>>> detail if you want people to be able to workout what is going wrong. >>>> >>>> Fred >>>> >>>>> >>>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for >>>>>> 127.0.0.1 at Wed Jul 25 13:34:10 +0530 2012 >>>>>> Served asset /lowpro.js - 200 OK (2ms) >>>>>> >>>>>> >>>>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for >>>>>> 127.0.0.1 at Wed Jul 25 13:34:10 +0530 2012 >>>>>> Served asset /lowpro.js - 200 OK (0ms) >>>>>> >>>>>> >>>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 >>>>>> 2012 >>>>>> Processing by ContactsController#index as JS >>>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>>> =''sumit'') LIMIT 1 >>>>>> Redirected to http://localhost:3000/logout >>>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>>> >>>>>> >>>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 >>>>>> 2012 >>>>>> Processing by ContactsController#index as JS >>>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>>> =''sumit'') LIMIT 1 >>>>>> Redirected to http://localhost:3000/logout >>>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>>> >>>>>> >>>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>>>> Processing by UserController#logout as JS >>>>>> Redirected to http://localhost:3000/ >>>>>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >>>>>> >>>>>> >>>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>>>> Processing by UserController#logout as JS >>>>>> Redirected to http://localhost:3000/ >>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >>>>>> >>>>>> >>>>>> >>>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Pagarbiai, Gintautas -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
On 25 Jul 2012, at 10:45, sumit srivastava wrote:> The same code was running fine earlier but now I am not able to get where it has got problem.What did you change between the last time it worked, and now? Peter -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I was actually looking to insert custom error pages. On Googling I got to know production mode produces error page by default. I just wanted to explore it and ran it in production mode. The production mode required some pre-compiled files so just did that. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:21, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> So what did you do exactly to "compile" the code. I mean it is pretty > clear that the answer lighs there. Just BTW have you tried simply > restarting your machine, or checked that there are no renegade Rails server > processes running? But most important are the steps that you took to make a > working project break :) Please take some time to explain what you did when > you realized "OK, it''s ready for prod, I better compile it". > > > 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> I do have before_filter and to make sure they aren''t messing up things, I >> ran my app after removing them but nothing changed. The same code was >> running fine earlier but now I am not able to get where it has got problem. >> >> >> Regards >> Sumit Srivastava >> >> The power of imagination makes us infinite... >> >> >> On 25 July 2012 15:09, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> I am thinking along the lines: why 2 requests? Why not 3, or 4, or an >>> infinite loop? You mentioned you "pre-compiled" it as a preparation to >>> deploy I guess. Can you tell more about what that exactly means in your >>> case? Basically it looks like your rails app is receiving two requests one >>> after the other; though you can see from timestamps of first pair of >>> requests it''s not exactly duplicated requests: >>> >>> Started GET "/assets/lowpro.js?body=1&_=1343203450861" >>> Started GET "/assets/lowpro.js?body=1&_=1343203450915" >>> >>> You might be running two web servers that both might be forwarding >>> requests to the app, or you misconfigured something: either for your web >>> server (i.e. Apache), or you used some too-clever before filters logic that >>> only redirect one. Does the latter ring a bell? Are you counting >>> login/access county at all (this would likely be an app level before filter >>> because of quite a few different actions being affected). >>> >>> >>> >>> 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> >>>> I am currently running my app in development mode. This log is of >>>> development mode. Am not able to deduce what exactly went wrong. >>>> >>>> Regards >>>> Sumit Srivastava >>>> >>>> The power of imagination makes us infinite... >>>> >>>> >>>> >>>> On 25 July 2012 14:53, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>> >>>>> >>>>> >>>>> On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: >>>>>> >>>>>> I pre-compiled my app to use in production mode. And after that it >>>>>> started to perform every action twice. I am not able to resolve it. My log >>>>>> comes something like this. >>>>>> >>>>>> >>>>> You might need to describe your production setup in a little more >>>>> detail if you want people to be able to workout what is going wrong. >>>>> >>>>> Fred >>>>> >>>>>> >>>>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for >>>>>>> 127.0.0.1 at Wed Jul 25 13:34:10 +0530 2012 >>>>>>> Served asset /lowpro.js - 200 OK (2ms) >>>>>>> >>>>>>> >>>>>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for >>>>>>> 127.0.0.1 at Wed Jul 25 13:34:10 +0530 2012 >>>>>>> Served asset /lowpro.js - 200 OK (0ms) >>>>>>> >>>>>>> >>>>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 >>>>>>> 2012 >>>>>>> Processing by ContactsController#index as JS >>>>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>>>> =''sumit'') LIMIT 1 >>>>>>> Redirected to http://localhost:3000/logout >>>>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>>>> >>>>>>> >>>>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 >>>>>>> 2012 >>>>>>> Processing by ContactsController#index as JS >>>>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>>>> =''sumit'') LIMIT 1 >>>>>>> Redirected to http://localhost:3000/logout >>>>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>>>> >>>>>>> >>>>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>>>>> Processing by UserController#logout as JS >>>>>>> Redirected to http://localhost:3000/ >>>>>>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >>>>>>> >>>>>>> >>>>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>>>>>> Processing by UserController#logout as JS >>>>>>> Redirected to http://localhost:3000/ >>>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >>>>>>> >>>>>>> >>>>>>> >>>>>> -- >>>>> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>>> >>>>> >>>> >>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Pagarbiai, > Gintautas > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Peter, I added code for session management where one user can login only using one browser at a time. Other than that I tried production mode of the app. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:25, Peter Hicks <peter.hicks-AEjVCzJlOor10XsdtD+oqA@public.gmane.org> wrote:> > On 25 Jul 2012, at 10:45, sumit srivastava wrote: > > > The same code was running fine earlier but now I am not able to get > where it has got problem. > > What did you change between the last time it worked, and now? > > > Peter > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Check your custom error pages implementation (controller code). It''s thinkable that you do a redirect there if there is no error or something. 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> I was actually looking to insert custom error pages. On Googling I got to > know production mode produces error page by default. I just wanted to > explore it and ran it in production mode. The production mode required some > pre-compiled files so just did that. > > > Regards > Sumit Srivastava > > The power of imagination makes us infinite... > > > On 25 July 2012 15:21, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> So what did you do exactly to "compile" the code. I mean it is pretty >> clear that the answer lighs there. Just BTW have you tried simply >> restarting your machine, or checked that there are no renegade Rails server >> processes running? But most important are the steps that you took to make a >> working project break :) Please take some time to explain what you did when >> you realized "OK, it''s ready for prod, I better compile it". >> >> >> 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >>> I do have before_filter and to make sure they aren''t messing up things, >>> I ran my app after removing them but nothing changed. The same code was >>> running fine earlier but now I am not able to get where it has got problem. >>> >>> >>> Regards >>> Sumit Srivastava >>> >>> The power of imagination makes us infinite... >>> >>> >>> On 25 July 2012 15:09, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> >>>> I am thinking along the lines: why 2 requests? Why not 3, or 4, or an >>>> infinite loop? You mentioned you "pre-compiled" it as a preparation to >>>> deploy I guess. Can you tell more about what that exactly means in your >>>> case? Basically it looks like your rails app is receiving two requests one >>>> after the other; though you can see from timestamps of first pair of >>>> requests it''s not exactly duplicated requests: >>>> >>>> Started GET "/assets/lowpro.js?body=1&_=1343203450861" >>>> Started GET "/assets/lowpro.js?body=1&_=1343203450915" >>>> >>>> You might be running two web servers that both might be forwarding >>>> requests to the app, or you misconfigured something: either for your web >>>> server (i.e. Apache), or you used some too-clever before filters logic that >>>> only redirect one. Does the latter ring a bell? Are you counting >>>> login/access county at all (this would likely be an app level before filter >>>> because of quite a few different actions being affected). >>>> >>>> >>>> >>>> 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>>> >>>>> I am currently running my app in development mode. This log is of >>>>> development mode. Am not able to deduce what exactly went wrong. >>>>> >>>>> Regards >>>>> Sumit Srivastava >>>>> >>>>> The power of imagination makes us infinite... >>>>> >>>>> >>>>> >>>>> On 25 July 2012 14:53, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote: >>>>> >>>>>> >>>>>> >>>>>> On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: >>>>>>> >>>>>>> I pre-compiled my app to use in production mode. And after that it >>>>>>> started to perform every action twice. I am not able to resolve it. My log >>>>>>> comes something like this. >>>>>>> >>>>>>> >>>>>> You might need to describe your production setup in a little more >>>>>> detail if you want people to be able to workout what is going wrong. >>>>>> >>>>>> Fred >>>>>> >>>>>>> >>>>>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for >>>>>>>> 127.0.0.1 at Wed Jul 25 13:34:10 +0530 2012 >>>>>>>> Served asset /lowpro.js - 200 OK (2ms) >>>>>>>> >>>>>>>> >>>>>>>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for >>>>>>>> 127.0.0.1 at Wed Jul 25 13:34:10 +0530 2012 >>>>>>>> Served asset /lowpro.js - 200 OK (0ms) >>>>>>>> >>>>>>>> >>>>>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 >>>>>>>> 2012 >>>>>>>> Processing by ContactsController#index as JS >>>>>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>>>>> =''sumit'') LIMIT 1 >>>>>>>> Redirected to http://localhost:3000/logout >>>>>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>>>>> >>>>>>>> >>>>>>>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 >>>>>>>> 2012 >>>>>>>> Processing by ContactsController#index as JS >>>>>>>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>>>>>>> =''sumit'') LIMIT 1 >>>>>>>> Redirected to http://localhost:3000/logout >>>>>>>> Filter chain halted as :deny_multiple_login rendered or redirected >>>>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>>>>>>> >>>>>>>> >>>>>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 >>>>>>>> 2012 >>>>>>>> Processing by UserController#logout as JS >>>>>>>> Redirected to http://localhost:3000/ >>>>>>>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >>>>>>>> >>>>>>>> >>>>>>>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 >>>>>>>> 2012 >>>>>>>> Processing by UserController#logout as JS >>>>>>>> Redirected to http://localhost:3000/ >>>>>>>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> -- >>>>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To unsubscribe from this group, send email to >>>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>>> To view this discussion on the web visit >>>>>> https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. >>>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>>> >>>>>> >>>>>> >>>>> >>>>> -- >>>>> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>>> >>>>> >>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> >> >> -- >> Pagarbiai, >> Gintautas >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Pagarbiai, Gintautas -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
"I added code for session management where one user can login only using one browser at a time" And what if the same user is doing a request from another browser? What actions do you take? It sounds reasonable to me to assume that your logic for determining if the browser detection logic is bugged. 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> Peter, > > I added code for session management where one user can login only using > one browser at a time. Other than that I tried production mode of the app. > > > Regards > Sumit Srivastava > > The power of imagination makes us infinite... > > > On 25 July 2012 15:25, Peter Hicks <peter.hicks-AEjVCzJlOor10XsdtD+oqA@public.gmane.org> wrote: > >> >> On 25 Jul 2012, at 10:45, sumit srivastava wrote: >> >> > The same code was running fine earlier but now I am not able to get >> where it has got problem. >> >> What did you change between the last time it worked, and now? >> >> >> Peter >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Pagarbiai, Gintautas -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
I store the request.session_options[:id] in my user table when one logs in. If another user logs in using another browser, this value is updated. For every action requested by user this value is checked by current value of this variable. If not matched, user is redirected to login page. Following is the code, def deny_multiple_login> if(session[:user]) > @session_old_key = (User.where("username =?", > session[:user].username)).first.current_sign_in_token > @session_current_key = request.session_options[:id] > > if(@session_current_key != @session_old_key) > respond_to do |format| > format.html {redirect_to logout_path} > end > end > end > end >This one is defined in ApplicationController. And then I user *before_filter :deny_multiple_login* in my * ContactsController*. Also I have another controller *Usercontroller *which is responsible for login actions and contacts controller is responsible to manage contacts list of every user. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:31, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> "I added code for session management where one user can login only using > one browser at a time" > > And what if the same user is doing a request from another browser? What > actions do you take? It sounds reasonable to me to assume that your logic > for determining if the browser detection logic is bugged. > > > 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> Peter, >> >> I added code for session management where one user can login only using >> one browser at a time. Other than that I tried production mode of the app. >> >> >> Regards >> Sumit Srivastava >> >> The power of imagination makes us infinite... >> >> >> On 25 July 2012 15:25, Peter Hicks <peter.hicks-AEjVCzJlOor10XsdtD+oqA@public.gmane.org> wrote: >> >>> >>> On 25 Jul 2012, at 10:45, sumit srivastava wrote: >>> >>> > The same code was running fine earlier but now I am not able to get >>> where it has got problem. >>> >>> What did you change between the last time it worked, and now? >>> >>> >>> Peter >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Pagarbiai, > Gintautas > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
I always forget, but you might want to try EXPLICITLY "true" at the end (if session[:user] is FALSE). I mean just use return true as an else statement to the that session[:user] condition, or just put true at the very end just before this before filter closes. 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> I store the request.session_options[:id] in my user table when one logs > in. If another user logs in using another browser, this value is updated. > For every action requested by user this value is checked by current value > of this variable. If not matched, user is redirected to login page. > Following is the code, > > def deny_multiple_login >> if(session[:user]) >> @session_old_key = (User.where("username =?", >> session[:user].username)).first.current_sign_in_token >> @session_current_key = request.session_options[:id] >> >> if(@session_current_key != @session_old_key) >> respond_to do |format| >> format.html {redirect_to logout_path} >> end >> end >> end >> end >> > This one is defined in ApplicationController. > > And then I user *before_filter :deny_multiple_login* in my * > ContactsController*. > Also I have another controller *Usercontroller *which is responsible for > login actions and contacts controller is responsible to manage contacts > list of every user. > > > > Regards > Sumit Srivastava > > The power of imagination makes us infinite... > > > On 25 July 2012 15:31, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> "I added code for session management where one user can login only using >> one browser at a time" >> >> And what if the same user is doing a request from another browser? What >> actions do you take? It sounds reasonable to me to assume that your logic >> for determining if the browser detection logic is bugged. >> >> >> 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >> >>> Peter, >>> >>> I added code for session management where one user can login only using >>> one browser at a time. Other than that I tried production mode of the app. >>> >>> >>> Regards >>> Sumit Srivastava >>> >>> The power of imagination makes us infinite... >>> >>> >>> On 25 July 2012 15:25, Peter Hicks <peter.hicks-AEjVCzJlOor10XsdtD+oqA@public.gmane.org> wrote: >>> >>>> >>>> On 25 Jul 2012, at 10:45, sumit srivastava wrote: >>>> >>>> > The same code was running fine earlier but now I am not able to get >>>> where it has got problem. >>>> >>>> What did you change between the last time it worked, and now? >>>> >>>> >>>> Peter >>>> >>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> >> >> -- >> Pagarbiai, >> Gintautas >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- Pagarbiai, Gintautas -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Tried it now. Didn''t help. Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 15:42, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I always forget, but you might want to try EXPLICITLY "true" at the end > (if session[:user] is FALSE). I mean just use return true as an else > statement to the that session[:user] condition, or just put true at the > very end just before this before filter closes. > > > 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > >> I store the request.session_options[:id] in my user table when one logs >> in. If another user logs in using another browser, this value is updated. >> For every action requested by user this value is checked by current value >> of this variable. If not matched, user is redirected to login page. >> Following is the code, >> >> def deny_multiple_login >>> if(session[:user]) >>> @session_old_key = (User.where("username =?", >>> session[:user].username)).first.current_sign_in_token >>> @session_current_key = request.session_options[:id] >>> >>> if(@session_current_key != @session_old_key) >>> respond_to do |format| >>> format.html {redirect_to logout_path} >>> end >>> end >>> end >>> end >>> >> This one is defined in ApplicationController. >> >> And then I user *before_filter :deny_multiple_login* in my * >> ContactsController*. >> Also I have another controller *Usercontroller *which is responsible for >> login actions and contacts controller is responsible to manage contacts >> list of every user. >> >> >> >> Regards >> Sumit Srivastava >> >> The power of imagination makes us infinite... >> >> >> On 25 July 2012 15:31, Gintautas Šimkus <dihitales-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >>> "I added code for session management where one user can login only using >>> one browser at a time" >>> >>> And what if the same user is doing a request from another browser? What >>> actions do you take? It sounds reasonable to me to assume that your logic >>> for determining if the browser detection logic is bugged. >>> >>> >>> 2012/7/25 sumit srivastava <sumit.theinvincible-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> >>> >>>> Peter, >>>> >>>> I added code for session management where one user can login only using >>>> one browser at a time. Other than that I tried production mode of the app. >>>> >>>> >>>> Regards >>>> Sumit Srivastava >>>> >>>> The power of imagination makes us infinite... >>>> >>>> >>>> On 25 July 2012 15:25, Peter Hicks <peter.hicks-AEjVCzJlOor10XsdtD+oqA@public.gmane.org> wrote: >>>> >>>>> >>>>> On 25 Jul 2012, at 10:45, sumit srivastava wrote: >>>>> >>>>> > The same code was running fine earlier but now I am not able to get >>>>> where it has got problem. >>>>> >>>>> What did you change between the last time it worked, and now? >>>>> >>>>> >>>>> Peter >>>>> >>>>> -- >>>>> 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-/JYPxA39Uh4Ykp1iOSErHA@public.gmane.orgm >>>>> . >>>>> To unsubscribe from this group, send email to >>>>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>>> For more options, visit https://groups.google.com/groups/opt_out. >>>>> >>>>> >>>>> >>>> -- >>>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> >>>> >>> >>> >>> >>> -- >>> Pagarbiai, >>> Gintautas >>> >>> -- >>> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >>> For more options, visit https://groups.google.com/groups/opt_out. >>> >>> >>> >> >> -- >> 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> To unsubscribe from this group, send email to >> rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org >> For more options, visit https://groups.google.com/groups/opt_out. >> >> >> > > > > -- > Pagarbiai, > Gintautas > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
I once experienced this kind of problem. This only happend with the create controller in my case. So every new record I created got created twice. I debugged step by step for hours but couldn''t find the problem. I think I just moved on to a newer Rails, or newer gems of this or that, and it went away. I was extremely puzzeld, because even with the step by step debugging I failed to see where the second request got intitiated. I hope you solve it. Cheers ace On Wednesday, July 25, 2012 4:09:10 AM UTC-4, Sumit Srivastava wrote:> > I pre-compiled my app to use in production mode. And after that it started > to perform every action twice. I am not able to resolve it. My log comes > something like this. > > > Started GET "/assets/lowpro.js?body=1&_=1343203450861" for 127.0.0.1 at >> Wed Jul 25 13:34:10 +0530 2012 >> Served asset /lowpro.js - 200 OK (2ms) >> >> >> Started GET "/assets/lowpro.js?body=1&_=1343203450915" for 127.0.0.1 at >> Wed Jul 25 13:34:10 +0530 2012 >> Served asset /lowpro.js - 200 OK (0ms) >> >> >> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >> Processing by ContactsController#index as JS >> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >> =''sumit'') LIMIT 1 >> Redirected to http://localhost:3000/logout >> Filter chain halted as :deny_multiple_login rendered or redirected >> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >> >> >> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >> Processing by ContactsController#index as JS >> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >> =''sumit'') LIMIT 1 >> Redirected to http://localhost:3000/logout >> Filter chain halted as :deny_multiple_login rendered or redirected >> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >> >> >> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >> Processing by UserController#logout as JS >> Redirected to http://localhost:3000/ >> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >> >> >> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >> Processing by UserController#logout as JS >> Redirected to http://localhost:3000/ >> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >> >> >> >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/lcMvMkILCbUJ. For more options, visit https://groups.google.com/groups/opt_out.
If that (and everything else) fails, I could try to help you debug it in a google chat, skype or whatever, cause I got some free time on my hands, and debugging is fun :) As people mentioned, you got to provide more info/code and whatnot, it''s just hardly doable with an answer every hour ;) 2012/7/25 Ace Suares <acesuares-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>> > I once experienced this kind of problem. This only happend with the create > controller in my case. So every new record I created got created twice. I > debugged step by step for hours but couldn''t find the problem. I think I > just moved on to a newer Rails, or newer gems of this or that, and it went > away. I was extremely puzzeld, because even with the step by step debugging > I failed to see where the second request got intitiated. > > I hope you solve it. > > Cheers > ace > > > > > On Wednesday, July 25, 2012 4:09:10 AM UTC-4, Sumit Srivastava wrote: >> >> I pre-compiled my app to use in production mode. And after that it >> started to perform every action twice. I am not able to resolve it. My log >> comes something like this. >> >> >> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for 127.0.0.1 >>> at Wed Jul 25 13:34:10 +0530 2012 >>> Served asset /lowpro.js - 200 OK (2ms) >>> >>> >>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for 127.0.0.1 >>> at Wed Jul 25 13:34:10 +0530 2012 >>> Served asset /lowpro.js - 200 OK (0ms) >>> >>> >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>> Processing by ContactsController#index as JS >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>> =''sumit'') LIMIT 1 >>> Redirected to http://localhost:3000/logout >>> Filter chain halted as :deny_multiple_login rendered or redirected >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>> >>> >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 >>> Processing by ContactsController#index as JS >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username >>> =''sumit'') LIMIT 1 >>> Redirected to http://localhost:3000/logout >>> Filter chain halted as :deny_multiple_login rendered or redirected >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) >>> >>> >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>> Processing by UserController#logout as JS >>> Redirected to http://localhost:3000/ >>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) >>> >>> >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 >>> Processing by UserController#logout as JS >>> Redirected to http://localhost:3000/ >>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) >>> >>> >>> >> -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/lcMvMkILCbUJ. > > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.
Looks like js is running twice. Try rake assets:clean, and then clear your browser cache (or try in incognito mode) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/-s78dQ3s09YJ. For more options, visit https://groups.google.com/groups/opt_out.
Looks like js is running twice. Try rake assets:clean, and then clear your browser cache (or try in incognito mode) -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/xFvfUX3QSl0J. For more options, visit https://groups.google.com/groups/opt_out.
On Jul 25, 10:25 am, sumit srivastava <sumit.theinvinci...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am currently running my app in development mode. This log is of > development mode. Am not able to deduce what exactly went wrong. >Clear out the precompiled assets - those will interfere with the development ones Fred> Regards > Sumit Srivastava > > The power of imagination makes us infinite... > > On 25 July 2012 14:53, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: > > >> I pre-compiled my app to use in production mode. And after that it > >> started to perform every action twice. I am not able to resolve it. My log > >> comes something like this. > > > You might need to describe your production setup in a little more detail > > if you want people to be able to workout what is going wrong. > > > Fred > > >> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for 127.0.0.1 > >>> at Wed Jul 25 13:34:10 +0530 2012 > >>> Served asset /lowpro.js - 200 OK (2ms) > > >>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for 127.0.0.1 > >>> at Wed Jul 25 13:34:10 +0530 2012 > >>> Served asset /lowpro.js - 200 OK (0ms) > > >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 > >>> Processing by ContactsController#index as JS > >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username > >>> =''sumit'') LIMIT 1 > >>> Redirected tohttp://localhost:3000/logout > >>> Filter chain halted as :deny_multiple_login rendered or redirected > >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) > > >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 2012 > >>> Processing by ContactsController#index as JS > >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username > >>> =''sumit'') LIMIT 1 > >>> Redirected tohttp://localhost:3000/logout > >>> Filter chain halted as :deny_multiple_login rendered or redirected > >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) > > >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 > >>> Processing by UserController#logout as JS > >>> Redirected tohttp://localhost:3000/ > >>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) > > >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 > >>> Processing by UserController#logout as JS > >>> Redirected tohttp://localhost:3000/ > >>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) > > >> -- > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To view this discussion on the web visit > >https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. > > For more options, visithttps://groups.google.com/groups/opt_out.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Frederick! I deleted all the pre-compiled assets in public folder and restarted my machine. It worked! Thanks :-) Regards Sumit Srivastava The power of imagination makes us infinite... On 25 July 2012 20:49, Frederick Cheung <frederick.cheung-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > On Jul 25, 10:25 am, sumit srivastava <sumit.theinvinci...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > I am currently running my app in development mode. This log is of > > development mode. Am not able to deduce what exactly went wrong. > > > > Clear out the precompiled assets - those will interfere with the > development ones > > Fred > > Regards > > Sumit Srivastava > > > > The power of imagination makes us infinite... > > > > On 25 July 2012 14:53, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > wrote: > > > > > > > > > > > > > > > > > > > > > On Wednesday, July 25, 2012 9:09:10 AM UTC+1, Sumit Srivastava wrote: > > > > >> I pre-compiled my app to use in production mode. And after that it > > >> started to perform every action twice. I am not able to resolve it. > My log > > >> comes something like this. > > > > > You might need to describe your production setup in a little more > detail > > > if you want people to be able to workout what is going wrong. > > > > > Fred > > > > >> Started GET "/assets/lowpro.js?body=1&_=**1343203450861" for 127.0.0.1 > > >>> at Wed Jul 25 13:34:10 +0530 2012 > > >>> Served asset /lowpro.js - 200 OK (2ms) > > > > >>> Started GET "/assets/lowpro.js?body=1&_=**1343203450915" for > 127.0.0.1 > > >>> at Wed Jul 25 13:34:10 +0530 2012 > > >>> Served asset /lowpro.js - 200 OK (0ms) > > > > >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 > 2012 > > >>> Processing by ContactsController#index as JS > > >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username > > >>> =''sumit'') LIMIT 1 > > >>> Redirected tohttp://localhost:3000/logout > > >>> Filter chain halted as :deny_multiple_login rendered or redirected > > >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) > > > > >>> Started GET "/contacts" for 127.0.0.1 at Wed Jul 25 13:34:32 +0530 > 2012 > > >>> Processing by ContactsController#index as JS > > >>> User Load (0.2ms) SELECT "users".* FROM "users" WHERE (username > > >>> =''sumit'') LIMIT 1 > > >>> Redirected tohttp://localhost:3000/logout > > >>> Filter chain halted as :deny_multiple_login rendered or redirected > > >>> Completed 302 Found in 2ms (ActiveRecord: 0.2ms) > > > > >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 > > >>> Processing by UserController#logout as JS > > >>> Redirected tohttp://localhost:3000/ > > >>> Completed 302 Found in 1ms (ActiveRecord: 0.0ms) > > > > >>> Started GET "/logout" for 127.0.0.1 at Wed Jul 25 13:34:33 +0530 2012 > > >>> Processing by UserController#logout as JS > > >>> Redirected tohttp://localhost:3000/ > > >>> Completed 302 Found in 2ms (ActiveRecord: 0.0ms) > > > > >> -- > > > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > > To view this discussion on the web visit > > >https://groups.google.com/d/msg/rubyonrails-talk/-/qyesRIBpn9QJ. > > > For more options, visithttps://groups.google.com/groups/opt_out. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit https://groups.google.com/groups/opt_out. > > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.