Hi Jeremy, I got a traceback yesterday, but the top frame on the call stack was the require 'sequel' line in my CGI script. I had to dig a little deeper to trace it to ParseTree. I added some debugging output (print "Content-type: text/plain\n\n#{path}") to the custom_require.rb file of rubygems, so I could see all the requires in order.
Sequel 2.0.1 does in fact load ParseTree: sequel > sequel_core > sequel_core/dataset > sequel_core/dataset/ sequelizer > parsetree And parsetree loads fileutils, and a SystemExit is raised sometime during or after that. When I removed sequelizer from the require list in sequel_core/ dataset, the short test script I posted earlier worked fine. (I added print "Content-type: text/plain\n\ndone" to see that response over HTTP.) But when I then added back the rest of the script, and the other libraries I wanted to use, some of those libraries were failing the way sequelizer/parsetree had. So something in Sequel 2.0.1 causing problems with other libraries, and I suspect it may have to do with the increased overloading of String or other classes. Again, this can be tested by creating a CGI script (chmod 755) containing: #/usr/local/bin/ruby require 'rubygems' begin require 'sequel' rescue Exception => e print "Content-type: text/plain\n\n" print "message: #{e.message} - class: #{e.class}\n" print caller end print "Content-type: text/html\n\ndone" And running it through Apache 2.2 (maybe 1.3 also), properly configured to handle the CGI script. I'm going to test it on a Linux box later today to see if it is OS X-specific. Shawn On Jun 15, 8:57 am, Jeremy Evans <[EMAIL PROTECTED]> wrote: > On Jun 14, 5:57 pm, Shawn <[EMAIL PROTECTED]> wrote: > > > > > Getting a SystemExit exception with require sequel 2.0.[01] in a CGI > > script, running on Apache 2.2 on Mac OS X 10.5. Here's the script: > > > #/usr/local/bin/ruby > > require 'rubygems' > > begin > > require 'sequel' > > rescue Exception => e > > print "Content-type: text/plain\n\n" > > print "message: #{e.message} - class: #{e.class}\n" > > print caller > > end > > > The script runs fine from the command line, but fails from Apache. > > I've traced the error to sequel_core/dataset/sequelizer.rb, which > > requires parse_tree. It seems to be failing somewhere in parse_tree. > > > This problem does not occur with Sequel 1.5.1. > > > There's some inline C code in parse_tree, so I don't know if there's > > some problem with that and Mac OS X. But since Sequel 1.5.1 also used > > the same version of parse_tree. Removing the require of sequelizer, I > > find that the same SystemExit comes from requiring a PHP sequelizer > > module. Commenting that require, the SystemExit then comes from my > > web framework. Reverting to Sequel 1.5.1 makes all these exceptions > > go away. > > > Since sequel fails to load parse_tree, this should be verifiable by > > trying to load sequel in a CGI script as I have above. Can someone > > else please verify the error? And then, does anyone have any insight > > about what's causing these exits? Is Sequel overloading some method > > or class in a bad way? > > I don't use OS X, so I can't verify the error. It's possible that > Sequel is overloading something they didn't like, but that seems > unlikely. From the code you posted, It doesn't look like you are > loading anything except rubygems ans sequel, so I'm not sure how > anything else could be raising an error if you aren't requiring > ParseTree. See if you can get a traceback for the error to see where > it is failing. > > In Sequel 2.1, ParseTree support will be deprecated, and it will be > removed in Sequel 2.2, BTW. > > Jeremy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to sequel-talk@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en -~----------~----~----~----~------~----~------~--~---