Heroku wearing Suspenders

Posted by Dan Croak

Jan 12

For our Beginning Ruby on Rails training course in Boston, January 29-30, all attendees will be:

DEVELOPING ON HEROKU

Heroku handles headaches

Have you ever tried to teach Rails to a friend? You want them to feel web development with Rails.

However, consider the following issues:

I believe Heroku elegantly solves these problems. Get your friends excited about Rails development without boring or confusing them with ancillary information.

Matt Knox of Sermo has been teaching Rails to other members of Boston.rb using Heroku. This is really a great idea so we’re stealing it.

Heroku instructions

Prerequisites

Create new app

On the My Apps page, click the “Create new app” button. You’ll see the following:

Your Rails app is immediately up and running on Heroku, which runs on top of Amazon Web Services. It displays the default Rails public page with modified instructions.

Suspenders

Clicking on the “import a tarball” link displays:

Save this Suspenders tarball:

Now import it into Heroku using the form.

Use the online editor

After importing, you’ll see your app’s view again.

Now click on the “Edit your app” link. An in-browser text editor displays:

You can see Suspenders is now installed, giving us access to the latest Shoulda, Factory Girl, rake tasks, Hoptoad Notifier, and much, much more.

That’s it! We’ve got “Heroku wearing Suspenders”, an excellent, standardized environment to teach Rails wherein students can learn the important stuff first, such as actual Test Driven Development with Rails, instead of fiddling with their OS, gems, or text editor.


Comments on this post

Nathan

Jan 12

Nathan said,

Great idea. I’ve tried teaching Rails to some of our .NET developers and the combined impact of command line + rails + git + text editor definitely outshines the benefits of rails a lot of times.

Matt Jones

Jan 12

Matt Jones said,

Not to be snarky, but if a person isn’t able to cope with a command line and a text editor (maybe even – gasp! – a version control system), I wouldn’t apply the term “developer” to them. That’s like call a kid building with Lincoln Logs a carpenter!

Trent

Jan 12

Trent said,

I definitely agree that Heroku is perfect for beginners, but that shouldn’t scare away the experienced Rails guys. Their current platform is perfect for a staging environment for any experience level. Also, they just announced that they were working on a commercial platform that will come out of private beta in the next couple months: http://blog.heroku.com/archives/2009/1/12/whats_up_at_heroku/

Dan Croak

Jan 12

Dan Croak said,

@Nathan,

I hear you. I was a .NET developer before Rails and this approach is in part inspired by my experience in transition.

@Matt,

Using the command line, text editor, and version control are certainly part of a developer’s toolkit. We advocate learning all three well, just like you need intimate knowledge of SQL to work with Rails, or for that matter Ruby. ActiveRecord and Rails conventions don’t eliminate the need to know your tools any more than Heroku does.

Our goal here is to simply lower the barrier to entry and only introduce concepts when they’re needed, in order of importance.

@Trent,

Agreed. I’m interested in experimenting more with Heroku’s killer git integration. Wait for the “git push” moment in this video and prepare to be impressed:

http://s3.amazonaws.com/heroku_screencasts/CLI_Edit.mov

AW

Jan 12

AW said,

I feel like a total hoser for rippin’ on the Heroku guys in a blog post!

Gonna send this post to some of my PHP friends. They work on Windows, mostly; this could be a nice way for them to quickly dip their feet into Rails without having to spend a few hours setting up an environment.

Nathan

Jan 12

Nathan said,

@matt – Of course that’s true, but to them those are Visual Studio, CVS, Windows Command Prompt etc. etc. This is a great way to get over those hurdles in an afternoon. On the flipside, it would be like being able to teach someone .NET without saying ‘OK here are the 5 DVDs of Visual Studio, see ya in 2 hours”.

That being said, living in the terminal and being forced to learn the ecosystem is one of my favorite parts of Ruby web development. I lamented on this when passenger was announced.

http://blog.blenderbox.com/2008/04/14/mod_rails-for-apache-the-end-of-an-era/

Igor Petrushenko

Jan 13

Igor Petrushenko said,

Good post, Dan

This is definitely good way to start for new rails people.

I remember the times, when I wanted to learn Rails, and had only empty windows. Yes, it was long time. Then switched to linux and finally on Macintosh.

However without all that attempts it will be boring :) I hope this tool will helps beginners to ‘believe’ in Ruby on Rails.

p.s. sorry for offtopic, but someone had problems with hoptoad and edge rails?

Thank you, Sincerely, Igor

anon

Jan 13

anon said,

I tried this today with a fresh Heroku account, and I got the following error:

Missing the Rails 2.1.1 gem. Please `gem install -v=2.1.1 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed. Heroku supports Rails version 2.0.2 and 2.1. Update RAILS_GEM_VERSION in your config/environment.rb to select one of these versions.

I don’t think I skipped a step, I just uploaded the tarball that was linked here. Did something change very recently?

another anon

Jan 14

another anon said,

Just FYI, I encountered the same issue (tried Jan 13 4:27 PM EST).

Is Heroku basing new services on Rails 2.2?

Dan Croak

Jan 15

Dan Croak said,

@anon & @another anon,

Thanks for the comments. The problem had to do with Heroku not using/removing vendor/rails.

I’ve updated the tarball to use Rails 2.1, which is the version they use for the service right now.


Sorry, comments are closed for this article.

© 2000 - 2009 by thoughtbot, inc.
written by a bushel of tiny robots