From: Robert Klemme Date: 2010-08-18T18:21:24+09:00 Subject: Re: ruby 1.9.1 unable to find ruby_parser from an included .rb file, but can from irb? 2010/8/18 andrew mcelroy : > Greetings, > > For some reason which I have been unable to track down tryruby.org is > down again. > > What makes almost no sense is the error log is stating: > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] \tfrom > /where/tr/is/hosted/TryRuby/public/tryruby.rb:4:in `', > referer: http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] \tfrom > /where/tr/is/hosted/TryRuby/public/irb.cgi:3:in `require', referer: > http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] \tfrom > /where/tr/is/hosted/TryRubyTryRuby/public/irb.cgi:3:in `
', > referer: http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] Premature end of > script headers: irb.cgi, referer: http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] > /where/tr/is/hosted/TryRuby/public/tryruby.rb:4:in `require': no such > file to load -- ruby_parser (LoadError), referer: http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] \tfrom > /where/tr/is/hosted/TryRuby/public/tryruby.rb:4:in `', > referer: http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] \tfrom > /where/tr/is/hosted/TryRuby/public/irb.cgi:3:in `require', referer: > http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] \tfrom > /where/tr/is/hosted/TryRuby/public/irb.cgi:3:in `
', referer: > http://tryruby.org/ > [Tue Aug 17 23:09:20 2010] [error] [client x.x.x.x] Premature end of > script headers: irb.cgi, referer: http://tryruby.org/ > > How earth would tryruby.rb be unable to find ruby_parser, when if i > drop into irb and require 'ruby_parser' > it returns true? > > I don't recall changing a single thing relevant to ruby1.9 on the > server. I have also tried just dropping in ruby_parser's code into > tryruby, but no avail. > > This really makes no sense why it would all of a sudden stop pulling > in ruby_parser. Different environments? Maybe it helps if you dump the current environment at the start of your CGI script - at least temporary for debugging purposes. Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/