A Standard for Bootstrapping Rails
Published in 2008, this chronicle by @sant0sk1 details the mechanics of building a profitable, self-funded business without venture backing.
Core Principles for Independent Builders:
Charging customers from day one acts as the ultimate filter for building software that solves genuine, high-urgency problems.
Keeping fixed overhead low and leveraging lean infrastructure allows founders to stay alive until market tailwinds kick in.
Small, repetitive improvements in customer retention and conversion rates yield massive returns over multi-year horizons.
Community Debate Themes:
The community focused on B2B customer acquisition channels, cold email vs SEO distribution, and balancing full-time employment with side-project development.
CATEGORY Bootstrapping & MRR →
HISTORICAL ERA Web 2.0 Genesis (2007–2013)
COMMUNITY SCORE 8 points
TOTAL DISCUSSIONS 3 comments
Rails bootstrapping is even more complicated than it looks. As Adam noted, at Insoshi we used to use
``` $ rake install
``` The source of this is
``` require 'active_record' require 'active_record/fixtures'
desc "Install Insoshi" task :install => :environment do |t| Rake::Task["db:migrate"].invoke Preference.create! end
``` But in edge Insoshi, which uses Rails 2.1, we switched to a simple script in order to accommodate the new way to handle gem dependencies:
``` $ script/install
``` It looks like this:
``` #!/usr/bin/env ruby
# Create some files and directories so they won't be created as root. # This doesn't do the actual installation, since that needs to be done as root. system("rake gems:install") # Install the gem dependencies (if any). system("sudo rake gems:install") # Run the main install task. system("rake install")
``` You can see that it calls the installation Rake task at the end. Why not just put the gems:install task in the Rake task? This seems like it should work:
``` require 'active_record' require 'active_record/fixtures'
desc "Install Insoshi" task :install => :environment do |t| Rake::Task["gems:install"].invoke system("sudo rake gems:install") Rake::Task["db:migrate"].invoke Preference.create! end
``` Unfortunately, running all the Rake tasks together like this fails, since the install task relies on the gem dependencies being met, but they aren't met at the time the environment gets loaded. (If there is a way to force an environment reload inside Rake, that would work, but I don't know how to do that.)
So, to ensure the greatest flexibility, maybe standard installation shouldn't be a Rake task. I admit that feels a bit weird, but unless we can crack the environment reload problem I don't see any other way.