<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -547,12 +547,15 @@ module NewRelic::Agent
     end
       
     def load_samplers
-      sampler_files = File.join(File.dirname(__FILE__), 'samplers', '*.rb')
-      Dir.glob(sampler_files) do |file|
+      sampler_files_root = File.join(File.dirname(__FILE__), 'samplers')
+      samplers = %w[memory.rb]
+      samplers += %w[cpu.rb mongrel.rb] unless RUBY_PLATFORM =~ /java/
+      for sampler in samplers do
         begin
-          require file
+          log.debug &quot;Loading sampler #{sampler}&quot;
+          require File.join(sampler_files_root, sampler)
         rescue =&gt; e
-          log.error &quot;Error loading sampler '#{file}': #{e}&quot;
+          log.error &quot;Error loading sampler '#{sampler}': #{e}&quot;
         end
       end
     end</diff>
      <filename>lib/new_relic/agent/agent.rb</filename>
    </modified>
    <modified>
      <diff>@@ -125,9 +125,9 @@ module NewRelic
       require 'optparse'
       # If nothing else is found, use the 3000 default
       default_port = 3000
-      ARGV.clone.options do |opts|
+      OptionParser.new do |opts|
         opts.on(&quot;-p&quot;, &quot;--port=port&quot;, String) { | default_port | }
-        opts.parse!
+        opts.parse!(ARGV.clone)
       end
       default_port
     end</diff>
      <filename>lib/new_relic/local_environment.rb</filename>
    </modified>
    <modified>
      <diff>@@ -13,6 +13,8 @@ module NewRelic
   CHANGELOG = &lt;&lt;EOF
 2009-04-10 version 2.8.9
   * fix problem finding the newrelic controller in dev mode
+  * fix incompatibility with older versions of optparse
+  * fix potential jvm problem with jruby
 2009-03-27 version 2.8.8
   * fix error with jruby on windows
 2009-03-20 version 2.8.7</diff>
      <filename>lib/new_relic/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 class NewrelicController &lt; ActionController::Base
   include NewrelicHelper
+  helper NewrelicHelper
   
   # See http://wiki.rubyonrails.org/rails/pages/Safe+ERB:
   # We don't need to worry about checking taintedness</diff>
      <filename>ui/controllers/newrelic_controller.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>486a6a116eec2f7a8b91be2796532d8329d15e6d</id>
    </parent>
  </parents>
  <author>
    <name>Bill Kayser</name>
    <email>bkayser@newrelic.com</email>
  </author>
  <url>http://github.com/mislav/newrelic_rpm/commit/4f606047b658fe079e3a03c940a25e333c5765b3</url>
  <id>4f606047b658fe079e3a03c940a25e333c5765b3</id>
  <committed-date>2009-04-08T15:41:04-07:00</committed-date>
  <authored-date>2009-04-08T15:41:04-07:00</authored-date>
  <message>Fixes for optparse incompatibility, jruby problem with samplers, newreliccontroller not getting found</message>
  <tree>fb9966ecb9afd3e93ce06f41e9c669ed3e767efc</tree>
  <committer>
    <name>Bill Kayser</name>
    <email>bkayser@newrelic.com</email>
  </committer>
</commit>
