Topic: Heroku and Rails 3.1: Application Error

Website runs locally on rails 3.1.0.rc2.

I upgraded my stack to bamboo-mri-1.9.2.

Added the following to my gemfile:

group :production do
  gem 'therubyracer-heroku', '~> 0.8.1.pre3'

App pushes with no errors. However, when you visit my website, I get a page displaying the following:

Application Error
An error occurred in the application and your page could not be served. Please try again in a few moments.

If you are the application owner, check your logs for details.

I created a support ticket with heroku presenting the issue, what I did, and posted my hero logs for them to decipher.

Here was heroku's response:

Heroku wrote:


Your changes seem sound. On bamboo we'll automatically change the static assets config for you with a plugin, though.

We don't support therubyracer, it's good to know there's a heroku-enabled version.


They are a ruby on rails host, and only a ruby on rails host. How did they not know about rails 3.1 not working and needing a specific gem for it?! Anyways, I didn't get an answer from them yet as to what is going on. I am still waiting for a reply. I figured that I would post here as well to see if any one else has had the same issue and can help me.

Thank you,

Learning rails, one day at a time.

Re: Heroku and Rails 3.1: Application Error

I received another response from heroku asking me to test in production mode locally.

rails server --environment production

No issues locally.


Last edited by tuscanidream (2011-06-09 13:42:32)

Learning rails, one day at a time.

Re: Heroku and Rails 3.1: Application Error

Issue resolved. Here's the steps I took to get Rails 3.1 on Heroku.

Getting Rails 3.1 installed on heroku:

# assuming rails 3.1 (latest pre build) works correctly locally

# install PostgreSql 9 via package installer

# install pg gem
PATH=$PATH:/Library/PostgreSQL/9.0/bin/ # directory to pg_config (mac 10.6.7)... without this the gem will not install
gem install pg
gem list # verify that it is installed

# modify gemfile

group :development, :test do
  gem 'sqlite3'

group :production do
  gem 'therubyracer-heroku', '~> 0.8.1.pre3'
  gem 'pg'

# make sure bundler is happy
bundle install

# test locally under development and production modes
rails server
rails server --environment production

# push to heroku and enjoy

Learning rails, one day at a time.