Sean’s Obsessions


  • I'm a happy Linode customer. This is a Linode 540 VPS. Linode periodically increases RAM and disk while keeping costs steady, which makes them the natural choice.
  • Archives

Archive for the 'Ruby on Rails' Category

21 Jan

Making New Relic Awesome

ХудожникБогородицаUpdate – if you sign up through this link, New Relic will send you an RC helicopter for trying out New Relic. Like many Rails people, I use New Relic to monitor my Rails app. At Wave Accounting we even pay for it. It’s well worth the money, as you get a lot of extra [...]

25 Oct

Twilio Client Quickstart – In Ruby

икони цени I’ve wanted to play with the Twilio client for a while. They have this great quick start but it’s written in PHP. Now I don’t mind PHP, but I prefer Ruby. If I’m going to write anything using the client, it’s going to be in Ruby, so I don’t see the point in [...]

25 Jul

Good for now does not mean good forever

КартиниSmallPayroll.ca was my first big Rails project, and looking back at some of the code, it shows. One of the first things I did was the timesheet. The form has 21 input fields per employee, then it has to go through the database and figure out if days have changed or deleted. So it’s doing [...]

16 Jun

Freshbooks/Heroku and Twilio APIs

I have been playing with the Freshbooks API and the Twilio API as part of a contest that Twilio is running. It’s a great excuse to try something I’ve been meaning to do for a while. I ran into a few problems. The freshbooks gem doesn’t work under 1.9.2, which I found out after trying [...]

10 Jun

Showing git commits in a Rails view

I have an administration panel for my Rails application that shows various information. I’ve found it helpful to show the last few commits along with a link to the repository. Here’s the code: Controller: @commits = Array.new git = `git log -15 –abbrev-commit –pretty=format:”%H – %cr – %s – %d”` git.split(/\n/).each do |commit| elements = [...]

16 Jan

Starting the beanstalk worker from capistrano

I recently changed SmallPayroll to use Beanstalkd instead of delayed_job for background processing. delayed_job is an awesome tool and makes asynchronous processing so simple. However I wanted to have multiple queues so that I could have different workers processing different queues, and have some upcoming needs to process the jobs quicker than the 5 second [...]

09 Dec

Installing ExceptionNotifier for Rails 3

I was just fighting with this, and being new to the Rails 3 way of things, the docs didn’t quite make sense. Step 1 – Install the plugin rails plugin install https://github.com/rails/exception_notification.git Step 2 – Edit config/application.rb: module MyApp class Application < Rails::Application # ….. # somewhere in this block put the following: config.middleware.use “::ExceptionNotifier”, [...]

27 Sep

Fun with git

трапезни масиI’ve started using Git instead of svn. Like many other people, I tried it out to get easier branching, but found it’s just a pleasure to use in general. One great feature is that git can work with an SVN repository. You use git to check out some SVN code into a local git [...]

29 Jun

Load testing a Rails app with JMeter and the authenticity_token

I have been slowly learning how to use JMeter to load test the Small Payroll application. One of the problems has been getting around the CSRF protection that Rails puts in with the authenticity_token parameter. Each form has a hidden form element: <div style=”margin:0;padding:0;display:inline”> <input name=”authenticity_token” type=”hidden” value=”16iUP1J2tdSKyvHKgYR/I/og6K7NgPPmTHCZ+idQP4k=” /> </div> The token is also encrypted [...]

03 Sep

Shoulda, nested contexts, and should_change_by

I love some of shoulda’s macros, partially because it forces me to think about my tests and put them in setup blocks, which ends up making things cleaner. So I ran into a case where I do an action and use should_change to make sure that a certain number of rows were added to a [...]

© 2012 Sean’s Obsessions | Entries (RSS) and Comments (RSS)

Powered by Wordpress, design by Web4Sudoku, based on Pinkline byGPS Gazette