Search code examples
ruby-on-railshoptoad

Rails w/ HopToad -- Deploying?


I have a deployed Rails application that I'd like to use with Hoptoad (an online exception notification service). It comes packaged in a gem that I installed on my deployment server, but I need to run the script/generate hoptoad every time I deploy to configure it because the Hoptoad config files/changes exist only on my production application (and not on my development, so when I deploy, they all get erased).

Is there an easy way to run that script/generate on the production server every time I deploy? I feel like you could do this with Capistrano tasks, but I don't know how to do that.

What do people usually do for this? Sorry if this post is a little hard to understand, I'm not quite sure how to explain the issue.

Thanks!


Solution

    • You can add the Hoptoad configuration file to your source code repository so that it gets deployed as part of the Rails application.

    • Alternatively, if you don't want that information within your repository, then upload the config file to your production server (outside of Capistrano's normal releases directory structure) and have Capistrano create a symbolic link to it as part of the deployment process. I provided an answer to a similar question here which should give you the idea.