anynines website



Julian Weber

Published at 16.01.2015

How-To’s & Tutorials

How to Use Latest Ruby Versions on anynines

As Ruby versions get rolled out pretty frequently we need to be able to reflect this in our applications.

Since the current Heroku buildpack version only supports ruby versions up to 2.1.2 using the default environment settings we need to use the STACK environment variable to enable Ruby versions >= 2.1.3 when pushing applications to anynines. As Heroku introduced support for stacks we need to specify the “cedar” stack to enable current ruby version support for our application. 

Table of Contents

  • Gemfile
  • STACK environment variable
  • Push the Ruby application to anynines

At first we need to specify the  version within our Gemfile as usual:

[bash light=”true”]
source ‘’
ruby ‘2.2.0’


This will specify the Ruby version dependency for our application.

STACK environment variable

After pushing your application for the first time use the application identifier to set the STACK environment variable to “cedar”:

[bash light=”true”]
$> cf set-env <APP_NAME> STACK cedar

Push the Ruby application to anynines

Just re-push the application specifying the Heroku buildpack url as parameter. The STACK variable will be read during the buildpack execution (staging) phase. The buildpack will enable support for versions
> 2.1.2.

[bash light=”true”]
$> cf push -b

Enjoy using latest Ruby versions on anynines.

This blog post is an adaption of an article written by our colleague Robert. Please have a look at his blog about technical topics too.

© anynines GmbH 2024


Privacy Policy


© anynines GmbH 2024