# Deploying to Heroku?

**URL:** <https://community.miniprofiler.com/t/deploying-to-heroku/91>\
**Category:** uncategorized\
**Created:** [July 27, 2012, 8:49am UTC](https://community.miniprofiler.com/t/deploying-to-heroku/91 "2012-07-27T08:49:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Sanders](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/dave_sanders/32/461_2.png) [@Dave\_Sanders](https://community.miniprofiler.com/u/Dave_Sanders)\
**Post date:** [July 27, 2012, 8:49am UTC](https://community.miniprofiler.com/t/deploying-to-heroku/91/1 "2012-07-27T08:49:21Z")

</div>

I’m not very experienced with RACK, or much more than writing my rails app and making it go. I put in miniprofiler today in our rails project that I need to do some performance fixes on and then put it up into production. I also followed the instructions here [http://samsaffron.com/archive/2012/07/12/miniprofiler-ruby-edition](http://samsaffron.com/archive/2012/07/12/miniprofiler-ruby-edition) about putting in a before filter, and only turn on profiling if the user is in the appropriate admin groups. Traced thru the code and it works fine in dev.

In production however, its not turning on. I don’t know if thats because:

1. I need to flip a magic bit somewhere else to tell it to turn on in production
2. I need to do something weird in Heroku to get it to play nice, or
3. There’s no hope.

Anyone use this gem in heroku yet and have any feedback?

Cross posting this to StackOverflow too.

---

<div class="post-metadata">

**Author:** ![sam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/sam/32/377_2.png) [@sam](https://community.miniprofiler.com/u/sam)\
**Post date:** [July 28, 2012, 1:27am UTC](https://community.miniprofiler.com/t/deploying-to-heroku/91/2 "2012-07-28T01:27:54Z")

</div>

My guess is that this could be a storage issue, if for any reason haroku is load balancing across multiple vms stuff can get weird.

To diagnose:

try:

- [http://mysite.com?pp=help](http://mysite.com?pp=help) - if you are getting any results the hook is up and you have a storage issue.

If that is the case you should try the RedisStore

---

<div class="post-metadata">

**Author:** ![Dave\_Sanders](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/dave_sanders/32/461_2.png) [@Dave\_Sanders](https://community.miniprofiler.com/u/Dave_Sanders)\
**Post date:** [July 30, 2012, 4:42am UTC](https://community.miniprofiler.com/t/deploying-to-heroku/91/3 "2012-07-30T04:42:07Z")

</div>

Ok, that sort of worked (using Redis) but its pretty chaotic, probably due to Heroku’s environment. For example, I’ll hit the main page and not see anything, then go into a sub page and it will work. Then later, the main page starts working, or sometimes, it never does. Very strange, but totally understandable.

So let me ask a followup question: I have another environment I created called “devprod” which uses local dev server, but connects to production database. Since the main issues I’m having are long running queries in the production database (due to a lot of data) I’m thinking I’ll just do these performance investigations in devprod.

However, I can’t see pp=help when I run under that environment. Is there something different I need to do to make it work there?

---

<div class="post-metadata">

**Author:** ![sam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/sam/32/377_2.png) [@sam](https://community.miniprofiler.com/u/sam)\
**Post date:** [July 30, 2012, 1:32pm UTC](https://community.miniprofiler.com/t/deploying-to-heroku/91/4 "2012-07-30T13:32:28Z")

</div>

I think I am going to change the railtie, this keeps on tripping people [https://github.com/SamSaffron/MiniProfiler/blob/master/Ruby/lib/mini\_profiler\_rails/railtie.rb](https://github.com/SamSaffron/MiniProfiler/blob/master/Ruby/lib/mini_profiler_rails/railtie.rb) (a more sane pull request - perhaps only disable in test)

---

<div class="post-metadata">

**Author:** ![sam](https://sea2.discourse-cdn.com/flex016/user_avatar/community.miniprofiler.com/sam/32/377_2.png) [@sam](https://community.miniprofiler.com/u/sam)\
**Post date:** [July 30, 2012, 2:46pm UTC](https://community.miniprofiler.com/t/deploying-to-heroku/91/5 "2012-07-30T14:46:13Z")

</div>

@Dave regarding hitting pages and seeing nothing, can you have a look at the google chrome network tab to see what is happening, are any requests failing?
