Hi, Using Netbeans 6.7.1, Rails Gem Version 2.3.2 MySQL Server 5.1 I am currently doing the depot application from the pragmatic programmer book (agile web development with rails) everything has been fine up until the point of creating sessions. I know they are using an earlier version of Ruby and the gems version is 2.2.2. As soon as I put the necessary code in the website no longer works and I get the following error in WEBrick: => Booting WEBrick => Rails 2.3.2 application starting on http://0.0.0.0:3001 JRuby limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL I:/Program Files/NetBeans 6.7.1/ruby2/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:84 warning: given block not used => Call with -d to detach => Ctrl-C to shutdown server [2010-01-09 17:52:22] INFO WEBrick 1.3.1 [2010-01-09 17:52:22] INFO ruby 1.8.6 (2009-07-23) [java] [2010-01-09 17:52:22] INFO WEBrick::HTTPServer#start: pid=8420 port=3001 I have made sure I am using the updated (2.3 Ruby on Rails) ActionController''s in the session_store.rb so I can only assume it is a problem with something else, which i have no idea about! Anyone have any ideas? Thanks, Matt -- View this message in context: http://old.nabble.com/Problem-with-Sessions-tp27091244p27091244.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jan 9, 2010 at 10:11 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> the website no longer works and I get the following error in WEBrick:? I don''t see any "error" in the following, and certainly nothing to do with sessions. Can you explain why you think you have some kind of problem? However, before you go any further I''d strongly recommend you update JRuby to 1.4.0 - 1.2.0 is really old...> => Booting WEBrick > => Rails 2.3.2 application starting on http://0.0.0.0:3001 > JRuby limited openssl loaded. gem install jruby-openssl for full support. > http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL > I:/Program Files/NetBeans > 6.7.1/ruby2/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:84 > warning: given block not used > => Call with -d to detach > => Ctrl-C to shutdown server > [2010-01-09 17:52:22] INFO WEBrick 1.3.1 > [2010-01-09 17:52:22] INFO ruby 1.8.6 (2009-07-23) [java] > [2010-01-09 17:52:22] INFO WEBrick::HTTPServer#start: pid=8420 port=3001-- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Why is jruby even in the equation? Is it a Netbeans thing? On Sat, Jan 9, 2010 at 10:35 AM, Hassan Schroeder < hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Jan 9, 2010 at 10:11 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > > > the website no longer works and I get the following error in WEBrick: > > ? I don''t see any "error" in the following, and certainly nothing to > do with sessions. Can you explain why you think you have some > kind of problem? > > However, before you go any further I''d strongly recommend you > update JRuby to 1.4.0 - 1.2.0 is really old... > > > => Booting WEBrick > > => Rails 2.3.2 application starting on http://0.0.0.0:3001 > > JRuby limited openssl loaded. gem install jruby-openssl for full support. > > http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL > > I:/Program Files/NetBeans > > > 6.7.1/ruby2/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:84 > > warning: given block not used > > => Call with -d to detach > > => Ctrl-C to shutdown server > > [2010-01-09 17:52:22] INFO WEBrick 1.3.1 > > [2010-01-09 17:52:22] INFO ruby 1.8.6 (2009-07-23) [java] > > [2010-01-09 17:52:22] INFO WEBrick::HTTPServer#start: pid=8420 port=3001 > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- Curtis Cooley curtis.cooley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org home:http://curtiscooley.com blog:http://ponderingobjectorienteddesign.blogspot.com ==============Leadership is a potent combination of strategy and character. But if you must be without one, be without the strategy. -- H. Norman Schwarzkopf -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
When i run the application I cannot access any of the pages (store, products...etc) I get an error page saying "Sorry there is a problem with this page" come up. If i remove the code from sessions_store and remove the DB creation the site begins to work again. I will look at updating my JRuby version. Hassan Schroeder-2 wrote:> > On Sat, Jan 9, 2010 at 10:11 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > >> the website no longer works and I get the following error in WEBrick: > > ? I don''t see any "error" in the following, and certainly nothing to > do with sessions. Can you explain why you think you have some > kind of problem? > > However, before you go any further I''d strongly recommend you > update JRuby to 1.4.0 - 1.2.0 is really old... > >> => Booting WEBrick >> => Rails 2.3.2 application starting on http://0.0.0.0:3001 >> JRuby limited openssl loaded. gem install jruby-openssl for full support. >> http://wiki.jruby.org/wiki/JRuby_Builtin_OpenSSL >> I:/Program Files/NetBeans >> 6.7.1/ruby2/jruby-1.2.0/lib/ruby/gems/1.8/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:84 >> warning: given block not used >> => Call with -d to detach >> => Ctrl-C to shutdown server >> [2010-01-09 17:52:22] INFO WEBrick 1.3.1 >> [2010-01-09 17:52:22] INFO ruby 1.8.6 (2009-07-23) [java] >> [2010-01-09 17:52:22] INFO WEBrick::HTTPServer#start: pid=8420 port=3001 > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan > > -- > 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 this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- View this message in context: http://old.nabble.com/Problem-with-Sessions-tp27091244p27091561.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jan 9, 2010 at 10:47 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > When i run the application I cannot access any of the pages (store, > products...etc) I get an error page saying "Sorry there is a problem with > this page" come up. > > If i remove the code from sessions_store and remove the DB creation the site > begins to work again. >What''s in the log file? Perhaps there''s a clue there. -- Curtis Cooley curtis.cooley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org home:http://curtiscooley.com blog:http://ponderingobjectorienteddesign.blogspot.com ==============Leadership is a potent combination of strategy and character. But if you must be without one, be without the strategy. -- H. Norman Schwarzkopf -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jan 9, 2010 at 10:47 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > When i run the application I cannot access any of the pages (store, > products...etc) I get an error page saying "Sorry there is a problem with > this page" come up. > > If i remove the code from sessions_store and remove the DB creation the site > begins to work again.Not sure what "remove the DB creation" means, but -- Instead of making random changes, you should look at the error(s) in your logs; post the stack trace here if you have questions about it. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The log file doesnt seem to have anything wrong. I have just sent this to a friend and it all works on his pc, he is used exectly the same versions of JRuby, Netbeans, Webrick..etc and it works fine for him. The error I am getting is when i try to go to any page I get this: "We''re sorry, but something went wrong. We''ve been notified about this issue and we''ll take a look at it shortly." Its the books 500 internal error message. Could it be my browser settings? Curtis Cooley-3 wrote:> > On Sat, Jan 9, 2010 at 10:47 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: >> >> When i run the application I cannot access any of the pages (store, >> products...etc) I get an error page saying "Sorry there is a problem with >> this page" come up. >> >> If i remove the code from sessions_store and remove the DB creation the >> site >> begins to work again. >> > What''s in the log file? Perhaps there''s a clue there. > -- > Curtis Cooley > curtis.cooley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > home:http://curtiscooley.com > blog:http://ponderingobjectorienteddesign.blogspot.com > ==============> Leadership is a potent combination of strategy and character. But if > you must be without one, be without the strategy. > -- H. Norman Schwarzkopf > > -- > 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 this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- View this message in context: http://old.nabble.com/Problem-with-Sessions-tp27091244p27091708.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sat, Jan 9, 2010 at 11:01 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> > The log file doesnt seem to have anything wrong.Possible but unlikely -- what''s the last entry when you get this 500 error?> Its the books 500 internal error message. Could it be my browser settings?Actually, if you''re playing with session logic, you should try clearing *all* the cookies for your current domain and try again. -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks for your input guys, I have sorted the problem with the simplest of solutions I should have tried earlier... Restarted my pc, something must have messed up maybe with MySQL or maybe with my browser. I just got so used to it being my dodgy code!! Amazing how you can try and over complicate things! :D Hassan Schroeder-2 wrote:> > On Sat, Jan 9, 2010 at 11:01 AM, MattWim <mwimble-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: >> >> The log file doesnt seem to have anything wrong. > > Possible but unlikely -- what''s the last entry when you get this > 500 error? > >> Its the books 500 internal error message. Could it be my browser >> settings? > > Actually, if you''re playing with session logic, you should try clearing > *all* the cookies for your current domain and try again. > > -- > Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan > > -- > 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 this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > > >-- View this message in context: http://old.nabble.com/Problem-with-Sessions-tp27091244p27091976.html Sent from the RubyOnRails Users mailing list archive at Nabble.com. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
MattWim wrote:> Thanks for your input guys, I have sorted the problem with the simplest > of > solutions I should have tried earlier... > > Restarted my pc, something must have messed up maybe with MySQL or maybe > with my browser. I just got so used to it being my dodgy code!! Amazing > how > you can try and over complicate things! :DGood to see you fixed it :) I''m working through the same book at the moment myself (a great book IMO) and found that when i was coding up the session stuff i had to stop and restart the server a couple of times and also do a ''rake db:session:clear'' once as well. If you run into the same problem again it''s worth trying (its not the only place in the book that doing this has solved me problems actually). Have fun with the rest of the book! -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/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 this group at http://groups.google.com/group/rubyonrails-talk?hl=en.