Posts by Richard Schneeman

Container-Ready Rails 5

Rails 5 will be the easiest release ever to get running on Heroku. You can get it going in just five lines:

$ rails new myapp -d postgresql $ cd myapp $ git init . ; git add . ; git commit -m first $ heroku create $ git push heroku master 

These five lines (and a view or two) are all you need to get a Rails 5 app working on Heroku — there are no special gems you need to install, or flags you must toggle. Let's take a peek under the hood, and explore the interfaces baked right into Rails 5 that make it easy to deploy your app on any modern container-based platform.

Production Web Server as the Default

Before Rails 5, the default web server that you get when you run $ rails server is...

Continue reading »

Upgrading to Rails 5 Beta - The Hard Way

Rails 5 has been brewing for more than a year. To take advantage of new features, and stay on the supported path, you'll need to upgrade. In this post, we'll look at the upgrade process for a production Rails app, codetriage.com. The codebase is open source so you can follow along. Special thanks to Prathamesh for his help with this blog post.

How Stable is the Beta?

In Rails a beta means the API is not yet stable, and features will come and go. A Release Candidate (RC) means no new features; the API is considered stable, and RCs will continue to be released until all reported regressions are resolved.

Should you run your production app on the beta? There is value in getting a...

Continue reading »

A Patch in Time: Securing Ruby

There have been thousands of reported security vulnerabilities in 2013 alone, often with language that leaves it unclear if you're affected. Heroku's job is to ensure you can focus on building your functionality, as part of that we take responsibility for the security of your app as much as we're able. On Friday, November 22nd a security vulnerability was disclosed in Ruby (MRI): CVE-2013-4164 . Our team moved quickly to identify the risk to anyone using the Heroku platform and push out a fix.

The vulnerability

The disclosed Ruby vulnerability contains a denial-of-service vector with the possibility of arbitrary code execution as it involves a heap overflow. In a...

Continue reading »

Ruby 2.0.0 Now Default on All New Ruby Applications

Heroku provides an opinionated platform in order to help you build better applications. We give you a default version of Ruby to get you started, and give you a way to declare your version for total control. In the past creating an application would give you 1.9.2, starting today the default is 2.0.0.

Ruby 2.0.0 is fast, stable, and works out of the box with Rails 4. Applications running on 2.0.0 will have a longer shelf life than 1.9.3, giving you greater erosion resistance.

Default Behavior

If you have a previously deployed app it will continue to use Ruby 1.9.2, any new applications will run on 2.0.0. Heroku is an erosion resistant platform, which means we will not change a major or...

Continue reading »

Empowering Change: Programming Literacy for All

There has never been a better time to be a programmer. Every day more and more gadgets get connected or over-clocked. Programming is so prevalent that it often goes unnoticed in our daily lives. Whether we're scripting out social presence with IFTTT, or doing taxes with Excel, automation and programming has become an inescapable part of the modern world.

Heroku believes that to invest in our future, we must invest in programming literacy. While we're waiting for recursion to be a staple in our children’s classrooms, we can work on continuing and higher education today.

Heroku engineers are given opportunities and encouragement to be part of this movement. They’ve done so through...

Continue reading »

Adding Concurrency to Rails Apps with Unicorn

With support for Node.js, Java, Scala and other multi-threaded languages, Heroku allows you to take full advantage of concurrent request processing and get more performance out of each dyno. Ruby should be no exception.

If you are running Ruby on Rails with Thin, or another single-threaded server, you may be seeing bottlenecks in your application. These servers only process one request at a time and can cause unnecessary queuing. Instead, you can improve performance by choosing a concurrent server such as Unicorn which will make your app faster and make better use of your system resources. In this article we will explore how Unicorn works, how it gives you more processing power, and how...

Continue reading »

Run JRuby on Heroku Right Now

JRuby

Over a year ago Heroku launched the Cedar stack and the ability to run Java on our platform. Java is known as a powerful language - capable of performing at large scale. Much of this potential comes from the JVM that Java runs on. The JVM is the stable, optimized, cross-platform virtual machine that also powers other languages including Scala and Clojure. Starting today you can leverage the power of the JVM in your Ruby applications without learning a new language, by using JRuby on Heroku.

After a beta process with several large production applications, we are pleased to move JRuby support into general availability immediately. One of these companies Travis CI which provides free CI...

Continue reading »

Hacking mruby onto Heroku

If you're in the Ruby world, you've likely heard about mruby, Matz's latest experimental Ruby implementation. What I bet you didn't know is that you can run mruby on Heroku right now. As a matter of fact you can run just anything on Heroku, as long as it can compile it into a binary on a Linux box.

If you're new to mruby, or to compiling binaries take a look at my last article Try mruby Today. I cover getting mruby up and running on your local machine. If you are already up to speed then follow along as we use vulcan to package mruby as binary, wrap it up in a custom buildpack and then launch an app to use mruby on the Heroku cloud.

Continue Reading ...

Yesterday

If...

Continue reading »

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...

Continue reading »

Sunsetting the Argent Aspen Stack

Heroku's Aspen stack is the product that launched our company and inspired a new class of cloud services. After much deliberation and careful thought, we have decided to sunset the Aspen stack by Thursday, November 22nd. We ask application owners still using Aspen to migrate to Cedar.

Since Aspen's launch over four years ago, Rails has seen the introduction of Bundler for dependency management, the asset pipeline, and a major framework re-write. Heroku has also grown, and with the introduction of the Cedar stack, we have moved beyond our humble origins and have become a true polyglot platform.

The Aspen stack was a prototype that served as a living vision of what a platform that...

Continue reading »

Sunsetting and Deprecation at Heroku

Software erosion is what happens to your app without your knowledge or consent: it was working at one point, and then doesn't work anymore. When this happens you have to invest energy diagnosing and resolving the problem. Over a year ago Heroku's CTO, Adam Wiggins, first wrote about erosion-resistance on Heroku. Part of erosion-resistance is communication, and knowing what to expect moving into the future. This post will clarify what we mean by erosion-resistance, and help you understand what to expect when one of our features is deprecated or is sunset.

Erosion Resistance

Erosion-resistance means that your apps are protected against accidental or unannounced changes because...

Continue reading »

Multiple Ruby Version Support on Heroku

Maximizing parity between development and production environments is a best practice for minimizing surprises at deployment time. The version of language VM you're using is no exception. One approach to this is to specify it using the same dependency management tool used to specify the versions of libraries your app uses. Clojure uses this technique with Leinigen, Scala with SBT, and Node.js with NPM. In each case, Heroku reads the dependency file during slug compile and uses the version of the language that you specify.

Today, we're pleased to announce that we've added support for specifying a Ruby version to Gem Bundler, the dependency management tool for Ruby. This will...

Continue reading »

Matz Named 2011 Free Software Award Winner

We are pleased to announce that Yukihiro "Matz" Matsumoto, the creator of Ruby and Heroku's Chief Ruby Architect, has received the 2011 annual Advancement of Free Software Award. Presented by Richard Stallman and on behalf of the Free Software Foundation, the award is given each year to those who have greatly contributed to the freedom of software.

This is great news for Matz, who has dedicated over 20 years to the development of free software including the creation of the Ruby programming language. While writing Ruby he chose to focus on programmer happiness and productivity, and the result has been extraordinary. The popularity of the language, helped in part by the Rails...

Continue reading »


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