Lessons from Taking
Ownership of a Rails App.

Presentation by Prakash Murthy / @_prakash at Boulder Ruby User Group meetup on May 12, 2015

Slides at https://slides.com/prakash/rails_app_ownership

About Me:

Prakash Murthy

@_prakash

prakash.n.murthy@gmail.com

Freelancing since 2010 as a Ruby on Rails Developer

Comedy Works



  • Denver's premier destination for the very best in stand-up comedy since 1981

  • Two clubs. One in Downtown, the other in DTC

  • 1000+ live stand-up shows every year, ~115K tickets sold in 2014

  • 230K signed up users

Rails App : Managing ticketing, users, administration, ...

 

Started as a Rails 2.1.0 app in Oct 2008

 

 

I came on-board as the sole Rails developer in Aug of 2014

Progress since then...


Upgrading ruby from 1.8.7 to 2.2.0 & rails from 2.3.18 to 4.2.0
Aug - Nov 2014


Integrate the newly designed responsive UI views
Dec 2014 - Feb 2015


Go live on both projects
Mar 1, 2015

 

Have Sane Code Promotion workflow

 

The previous team made changes directly on the server!

Good News: There are tests!

 

Bad News: They don't work.

 

 

Blessing in disguise as it made me rewrite most of the tests and learn about the system along the way.

 

 

Run tests everytime code is changed. Continuous Integration

 

 

That way, the tests won't be forgotten.

 

 

Started with Codeship and switched to Circle CI.
Both are free!

 

 

Use copy of production database for testing/development (if possible)

 

Breaks the bad habit of "Testing in Production"

 

Scripts to copy the production database to 

a. Staging Database automatically over-night

b. Local Dev database on Demand.

 

 

Going beyond Heroku: Setting up a web server on hosted server is fun, and not too complicated.

 

 

 

ComedyWorks.com runs on a Media Temple machine, on linux OS, powered by Apache HTTP Server & Phusion Passenger

 

 

Refer the excellent Phusion Passenger users guide, Apache version document.

 

The Counter Example: Shopify

Not upgrading ruby/rails versions regularly leads to a world of pain.

Have less Gems :-)

Upgrade related pain : Largely from the plugins/gems that may or may not work with the upgraded ruby/rails version.

Watch the logs!

Exception Notifier Gem - to send emails when an exception occurs in Production.

Helped identify a few bugs

Measure Code Quality using Code Climate

Indicates how difficult it is to maintain, and to make changes in the system.

Communication

Facilitate communication by having good tools

 

 

Eg: Pivotal Tracker for project management / tracking bugs & features / communicating on these items

 

 

Eg: Slack for team chat. Proved very useful before Go-Live

 

 

Questions?

Made with Slides.com