gem install herokuSo that's way simple, and the directions are there as soon as you fire up your app for the first time. Despite this nicety, however, I came across a couple of other issues.
heroku clone untitled-b93f9c
cd untitled-b93f9c
[..local edits..]
git add .
git commit -m "local changes"
git push
First, the rails version. Heroku likes 2.0.2, or 2.1. I was running with version 2.1.2. So that just involved changing
RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSIONin config/environment.rb.
toRAILS_GEM_VERSION = '2.1' unless defined? RAILS_GEM_VERSION
Naturally, changing the rails version made some of my other packages squeal. Thoughtbot's Clearance authentication system, makes use of Digest::Sha1. This apparently does not come prepackaged with Rails 2.1, so another change to enviroment.rb fixed that:
Next, a :link_to method caused a problem:#Put the sha BACK!require 'digest/sha1'
Ruby language scholars might have spotted the problem without the error message, but once I got it, it was pretty simple. link_to can't be used with a symbol, so that's an easy fix. Alakazam!<div id="app_name"><%= link_to "my app name", :root %>
<%=link_to "my app name", "/" %>
So all is well now in the land of Heroku. A few things I'm wondering now... When will heroku support newer versions of rails? Is heroku(or will it become) a popular enough deployment option to force package developers to support a heroku friendly version? Will merb make both of these questions moot?
No comments:
Post a Comment