# Rails Profiling problems with RubyProf

**URL:** <https://www.ruby-forum.com/t/rails-profiling-problems-with-rubyprof/134301>\
**Category:** Rails\
**Created:** [April 9, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/rails-profiling-problems-with-rubyprof/134301 "2008-04-09T17:30:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [April 9, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/rails-profiling-problems-with-rubyprof/134301/1 "2008-04-09T17:30:37Z")

</div>

Hi,

I’m running into trouble trying to do some basic profiling of my app  
with RubyProf. I’ve done the usual searching around on Google, and not  
found anything. I’ve also tried updating my version of the RubyProf gem,  
in case there was any problem with it being out of date.

I’m trying to run the profiler script from within my rails app like so:

ruby script/performance/profiler  
‘Wibble.some\_action(“someparam”=\>“WER243”)’

This is the stacktrace I get:

Loading Rails…  
Using the ruby-prof extension.  
/some/rails/app/vendor/rails/railties/lib/commands/performance/profiler.rb:22:  
undefined method `clock_mode=' for RubyProf:Module (NoMethodError) from script/performance/profiler:3:in`require’  
from script/performance/profiler:3

Looking around at a couple of different rails apps that I have, it seems  
that this “clock\_mode” method is pretty standard.

Anyone got any ideas?

Thanks in advance,

Rob.

---

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [April 9, 2008, 5:37pm UTC](https://www.ruby-forum.com/t/rails-profiling-problems-with-rubyprof/134301/2 "2008-04-09T17:37:52Z")

</div>

On Apr 9, 10:30 am, Rob L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> ‘Wibble.some\_action(“someparam”=\>“WER243”)’  
> Looking around at a couple of different rails apps that I have, it seems  
> that this “clock\_mode” method is pretty standard.
> 
> Anyone got any ideas?

Looks like it will be fixed in 2.1:  
[http://dev.rubyonrails.org/ticket/9176](http://dev.rubyonrails.org/ticket/9176)

Let’s hope they ship soon.

Jeff

> **[Hey Daddio!](http://softiesonrails.com)**
>
> Home of Hey Daddio Software

---

<div class="post-metadata">

**Author:** ![rob](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/838e76/32.png) [@rob](https://www.ruby-forum.com/u/rob)\
**Post date:** [April 9, 2008, 5:43pm UTC](https://www.ruby-forum.com/t/rails-profiling-problems-with-rubyprof/134301/3 "2008-04-09T17:43:03Z")

</div>

Jeff C. wrote:

> On Apr 9, 10:30ï¿½am, Rob L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> wrote:
> 
> > ‘Wibble.some\_action(“someparam”=\>“WER243”)’  
> > Looking around at a couple of different rails apps that I have, it seems  
> > that this “clock\_mode” method is pretty standard.
> > 
> > Anyone got any ideas?
> 
> Looks like it will be fixed in 2.1:  
> [http://dev.rubyonrails.org/ticket/9176](http://dev.rubyonrails.org/ticket/9176)
> 
> Let’s hope they ship soon.
> 
> Jeff  
> [softiesonrails.com](http://softiesonrails.com)

Great. Thanks for the help on this. At least now I know I can patch this  
up by hand.

Rob.
