/heroku-buildpack-ruby-minimal

A minimal Heroku buildpack for ruby

Primary LanguageShell

heroku-buildpack-ruby-minimal

This is a Heroku Buildpack for ruby. It doesn't do nearly as much as the official ruby buildpack but it might do enough for you.

Using

For a new app:

$ heroku create --buildpack https://codon-buildpacks.s3.amazonaws.com/buildpacks/dpiddy/ruby.tgz

For an existing app:

$ heroku config:set BUILDPACK_URL=https://codon-buildpacks.s3.amazonaws.com/buildpacks/dpiddy/ruby.tgz

What it does

  1. determine which ruby to use based on the Gemfile's ruby directive, defaulting to ruby-1.9.3
  2. fetch ruby
  3. set up .profile.d/ruby.sh with GEM_PATH, LANG, PATH, and RACK_ENV (defaults to production, can be overidden)
  4. remove the cached bundle if the ruby version has changed
  5. remove the cached bundle if the BUILDPACK_REVISION has changed
  6. bundle install, using the cached bundle (inside the $CACHE_DIR) if available
  7. remove any docs, cached .gem files, and .git directories to save space

It supports the same ruby versions as the official ruby buildpack, except for jruby for now. You can see a list here.

What it does not do

  • binstubs: you must bundle exec ... to use the bundle, additionally your app's bin/ directory is not in $PATH
  • add default addons: the official ruby buildpack will add a database if you have pg in your bundle
  • specify default processes types: the official ruby buildpack will set defaults for web, rake, and console
  • rails assets stuff: the official ruby buildpack will install node if necessary and try to run rake assets:precompile
  • rails plugins: the official ruby buildpack will install plugins for logging, static asset serving, etc.
  • database.yml: the official ruby buildpack will set up database.yml for you, reading from $DATABASE_URL
  • anything related to syck/psych
  • jruby (yet): it doesn't install a JVM if you specify jruby in your Gemfile