Ruby 2.0 Preview Available on Heroku

When Heroku first launched you could only use one version of Ruby: 1.8.6. As the Ruby implementation matured and improved, so did Heroku. We recently announced the ability to specify your ruby version on Heroku, and we are happy to announce the first preview-build of Ruby available: starting today you can use Ruby 2.0 preview1 on Heroku.

Ruby 2.0

The Ruby core team has been hard at work on Ruby 2.0, which has a host of new features and boasts performance improvements. You can get a list of the major new features on the official Ruby 2.0.0 Preview1 announcement.

Heroku has been committed to the Ruby project by sponsoring the work of Yukihiro "Matz" Matsumoto, Koichi Sasada and Nobuyoshi Nakada on MRI Ruby. We have been very pleased with Ruby Core's progress, and look forward to the full release. You can take an in-depth look at the new Ruby 2.0 features available. But don't just read about it, try it out on Heroku today:

Get Ruby 2.0 Running on Heroku

Start by making a Gemfile that specifies Ruby 2.0.0:

$ echo 'source ""'  > Gemfile
$ bundle install
$ echo 'ruby "2.0.0"' >> Gemfile

Add the files to a Git repository:

$ git init
$ git add .
$ git commit -m "Ruby 2.0.0 preview on Heroku"

Then create a new heroku app and deploy:

$ heroku create
$ git push heroku master
-----> Heroku receiving push
-----> Ruby app detected
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.2.1
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
       The Gemfile specifies no dependencies
       Your bundle is complete! It was installed into ./vendor/bundle
       Cleaning up the bundler cache.
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for Ruby  -> console, rake
-----> Compiled slug size: 23.3MB
-----> Launching... done, v4 deployed to Heroku

 * [new branch]      master -> master

Now you can run Ruby 2.0 beta on Heroku!

$ heroku run bash
Running `bash` attached to terminal... up, run.1
~ $ ruby --version
ruby 2.0.0dev (2012-11-01 trunk 37411) [x86_64-linux]
~ $ ruby -e "puts 'hello world'"
hello world

Why Run 2.0 Preview1?

Ruby 2.0 will ship on February 24th, 2013 - which is four days before our developer conference Waza. Heroku's own Matz has announced that Rails 3.2 apps should work with Ruby 2.0 if they work on Ruby 1.9. Help us find any incompatibilities by checking your existing applications on Heroku. If you run into any bugs in the Ruby implementation, please open a bug in the Ruby bug tracker and let the Ruby team know what didn't work with the implementation.


If you are updating an existing app you will likely need to update your config vars manually. New apps should not experience any problems.


Thanks to the entire Ruby Core Team for their hard work on this release of Ruby, and special thanks to Terence Lee. Terence is Heroku's Ruby buildpack maintainer who did the leg work to enable Ruby 2.0.0 Preview1 on Heroku. Please try out this Ruby preview today, to help the Ruby core team and to help our community. Try it today.

Heroku Postgres Releases Follow into GA

Today Heroku Postgres is releasing the ability to Follow your database General Availability: this lets you easily create multiple read-only asynchronous replicas of your database, known as followers.

Followers enable some great use cases:

Read more about this exciting feature on the Heroku Postgres Blog.

Announcing Follow

Today we’re releasing the ability to follow your Heroku Postgres Database into General Availability: this lets you easily create multiple read-only asynchronous replicas of your database, known as followers.

After an extended beta period during which over 3,000 followers were created, many of which help power core Heroku systems, we’re excited to make the ability to safely and easily scale out access to your data available to all Heroku Postgres users.

Followers enable some great use cases:

One use case that has historically been challenging in database management is setting up a read replica, often referred to as a read slave. Traditionally this would require significant effort to provision, setup and configure machines and databases. Due to the time involved in this, most application developers opt for scaling up their database, rather than horizontally scaling out, an approach that can sustain significantly larger growth. During times of intense load, this leaves developers with no option to quickly reduce the load on their database without incurring significant downtime, resulting in databases becoming a liability, as opposed to adding value to a developer’s toolbox.

Follow Icon

When you follow a database you are given an entirely new follower which maintains a relationship to its leader. Your follower receives asynchronous updates from its leader and is often just seconds behind. Followers can be created with any of our production-tier plans. And with the recent release of our $50/mo Crane and $100/mo Kappa plans, these features are now available to an even wider audience than ever before. Creating a follower from an existing production database is as simple as:

$ heroku addons:add heroku-postgresql:crane --follow HEROKU_POSTGRESQL_LAVENDER
Adding heroku-postgresql:crane on craig... done, v114 ($50/mo)
Follower will become available for read-only queries when up-to-date
Use `heroku pg:wait` to track status
Use `heroku addons:docs heroku-postgresql:crane` to view documentation.

This command creates a new Heroku Postgres follower of a crane plan which is following a Heroku Postgres Database named Lavender. Followers can also easily be created by selecting from within the Followers area of the Heroku Postgres management dashboard:

Heroku Postgres Follower Creation


Heroku strives to provide tooling that empowers our customers to build and scale applications more easily; the ability to follow your database is a clear step in that direction. We’ve already seen 3 great use cases as outlined above, and we’re excited to see how the community takes this to the next level. If you're using a Production Heroku Database use follow to scale your database without fear! Visit Heroku Postgres to learn more about Heroku Postgres and to start creating followers today.

Heroku Office Hours, Wed 10/17 at 3pm PDT

This Wednesday 10/17 from 3-5pm we will be holding office hours for customers and users in our San Francisco office.

This is an opportunity for you to come meet us and ask questions about developing your apps on Heroku. It is an opportunity for us to learn more about you and your needs.

.@heroku's front door.   /cc @maddox @rtomayko

Heroku engineers, product managers, and designers will be available to chat with you about your code, application, business, or whatever else you want. Maybe you're a new user, and have some getting started questions. Perhaps you've been using Heroku for ages and have a high level architectural question. Or maybe you just want to shake someone's hand from the Heroku Postgres team. Either way stop by our offices at 321 11th Street (at the corner of Folsom). We are next to Slims. We look forward to seeing you.

View Larger Map

Upgrading to the Heroku Toolbelt

Heroku Toolbelt

The original version of the Heroku command-line tool was available as a Ruby gem. This made it easy to install on all platforms with just one command: gem install heroku. While we love this simplicity, it depends on a system install of Rubygems. To get this experience on widely varying development environments, we created the Heroku Toolbelt, a one-click installer for every major platform.

Going forward we will be sunsetting support for the heroku gem in favor of the Toolbelt. If you're already using the Toolbelt, you're fine to stop reading now. To verify whether you're using the gem or Toolbelt, use heroku version:

$ heroku version
heroku-toolbelt/2.32.11 (universal-darwin12.0) ruby/1.9.3 autoupdate

If the output includes heroku-toolbelt, you're all set.

Advantages of the Toolbelt

The Toolbelt is a self-contained installer that gives you everything you need to use Heroku. Some advantages of the Toolbelt include:

  • The Toolbelt is much faster, shaving several seconds off the startup of each heroku command.

  • The Toolbelt packages its own dependencies and will not conflict with your existing development tools.

  • The Toolbelt automatically keeps itself up to date with the latest available bug fixes, security updates, and new features.

Sunsetting the Gem

Starting today, all users still using the gem will see reminders to upgrade to the Toolbelt. This reminder will appear at most once daily when running a heroku command.

On December 1, 2012, we will stop releasing new updates to the heroku gem.

If you are using the heroku gem in your app to programatically access the Heroku API, we encourage you to migrate your code to the heroku-api gem. Existing versions of the heroku gem will remain on so any code referencing these gems should continue to function as long as the API they reference is available.

We encourage all users to upgrade to the Toolbelt today to take advantage of this new, streamlined CLI experience.

Browse the blog archives or subscribe to the full-text feed.

Visit the Engineering Blog