-
Faster Rspec: Jruby, Spork and Nailgun
UPDATE: You can use bundler binstubs to squeeze a bit more performance
-
Per-Project environment variables
UPDATE: I no longer source my
.env
like described in this post. I now use direnv to setup per-project local environment, including sourcing.env
. The described approach here could be exploited to do bad things to your system. Example attack: You clone a repo that includes a.env
file, when youcd
into the project, it changes yourPATH
to directory you’ve just cloned. That overridesls
or some other unix utility, which now takes over your system. -
Installing jruby with rvm and XCode 4.4
I recently setup a new Mac (running Lion) for development using jruby. As I have done many times in the past, I installed Xcode (4.4) and proceeded to install the command line tools. Next comes rvm, and we are humming along, until it complains that gcc-4.2 is not in my path. But it is. I can see it with
gcc --version
. In any case, the notes for rvm suggest using homebrew to install gcc-4.2 like so: -
Manage Your App's Multiple Processes With a Procfile
On simple web applications, it’s common to talk about a “develpment server” which one starts before coding. Any rails developer is familiar with
rails s
. It boots up your application and it’s ready to view on your favorite browser. As applications start to grow, so do the number of processes that your application depends on. Using memcached? Make sure it’s running. Need background processing? Better start your background worker. Pretty soon, you have half a dozen terminal tabs open and you haven’t begun coding yet. There is a better way. -
Deploy To Heroku With (Near) Zero Downtime
Heroku offers a great hosting platform that abstracts away most of the system administration tasks inherent in running an app. I have generally been very happy hosting productions apps in Heroku and have managed to do very well with it’s platform and it’s available add-ons to increase functionality. I really like the way the handle Postgres databases, which makes things like followers, clones and backups a simple 1-off command.