Ruby Patterns from GitHub's Codebase
zachholman.com
zachholman.com
Unnecessary statefulness for what should be a script sucks.
Running a whole VM just to run an app is immensely irritating.
Also, Vagrant breaks in the same ways the usual bundler mess breaks as well.
Can you clarify your meaning here? I fail to see how sequestering n random server components inside a vm, or vms, is more statefull than doing the same on your workstation.
[edit] I upvoted your response, because I appreciate your other points
It probably depends on what you're doing, but I've found Vagrant extremely valuable for doing sysadmin work. I do a lot of work with Chef for various clients, and Vagrant makes it trivial to test. From a clean Ubuntu or CentOS VM to a running system in a few minutes. I could see a lot of benefit to using this for application development and testing as well.
Although starting a VM to run an app is irritating, spending time hunting down why your build is breaking (or worse, why production is breaking) because someone had a library a few minor versions out of sync or because they're on a different operating system is immensely more irritating.
In short, the world needs a Vagrant-clone that's < 500 lines of bash.
Worth checking out again.
I mean, I hate writing documentation, but as someone who has had to come back to code I've written months prior (and I was the only one to work on the project), let alone code someone else wrote, I'm incredibly grateful when I look at old code that's actually documented. Plus I feel that writing a couple lines of documentation helps me figure out exactly what I want the code to do.
Mounting engines or Sinatra apps? Creating a new gem to for extractable functionality? Just curious about what this looks like under the hood.
Using documentation as an alternative to readable code is a pitfall.
We have 2 large Rails projects and an API server using Goliath[1], one of the Rails projects and the goliath server use models with symlinks.
[1] Goliath: http://postrank-labs.github.com/goliath/
gem "my_models", path: "vendor/future_gems/my_models/"
Once you are able to break them out completely, just remove the path reference and use a gem server instead.
# In config.ru
# App, V0, and Resque::Server are each sinatra apps
run Rack::URLMap.new({
"/" => App.new,
"/v0" => V0.new,
"/resque" => Resque::Server.new,
})We recently upgraded to Rails 2.3 which is built on Rack. `ActionController::Dispatcher.new` is the last Rack app on the stack now.