Thursday, March 18th, 2010

undefined method ‘remap’ for class ‘Magick::Image’

Problem
You have just deployed your rails application to dreamhost but you are getting this error from passenger.
Solution
There was a change in the ImageMagic between versions 6.4.3 and 6.4.4 from the affinity function to remap.
If you don’t want, or don’t have time to recompile the ImageMagick and install the rmagick gem, you can comment out the [...]

No Comments » - Posted in Dreamhost, linux, ruby on rails by kosmas

Monday, March 15th, 2010

Freezing rails to an older version using gems

Problem
You want to deploy to a shared host (dreamhost) that has a later version of rails from the one you have developed your application.
You also have a later version installed in your development pc,and using rake rails:freeze:gems uses the latest one and not the one you want.
Solution
Use the following to freeze the specific version you [...]

No Comments » - Posted in Dreamhost, ruby on rails by kosmas

Friday, March 12th, 2010

Getting your Github git project to dreamhost

Problem
You already have a project in github, but you want to move it to a different host (ie dreamhost)
Solution
Following the post here that describes how to setup a new git repository in dreamhost, the only difference after the initial setup :
ssh username@dreamhost_domain.com
mkdir -p ~/git/yourproject.git
cd ~/git/yourproject.git
git –bare init
is to edit your project’s .git/config file:
vi local_host/your_project/.git/config
and change [...]

No Comments » - Posted in Dreamhost, git, linux by kosmas

Monday, August 24th, 2009

RubyGem version error: rack(0.3.0 not ~> 1.0.0)

Problem
Trying to deploy in dreamhost with capistrano you get the error:
RubyGem version error: rack(0.3.0 not ~> 1.0.0)
Solution
Log in with ssh to your dreamhost account and then install the newer version of rack that is not yet installed in dreamhost:
gem install rack
That assumes that you have followed the instructions for setting up your local gems [...]

No Comments » - Posted in Dreamhost, ruby on rails by kosmas

Wednesday, September 17th, 2008

Dreamhost, Rails 2.1.1, Freeze, Capistrano

Problem
With the imminent upgrade in Dreamhost to Rails 2.1.1 (dreamhost blog post here), you may want to freeze your Rails version to a previous version, using capistrano.

Solution
On your local development pc freeze the rails:
rake rails:freeze:gems
Add the new code to your svn repository:
svn commit -m ‘freeze rails’
And then deploy to dreamhost using capistrano:
cap deploy
Your rails project [...]

4 Comments » - Posted in ruby on rails by kosmas

Wednesday, July 16th, 2008

Developing in Rails 2.1 and deploying in Rails 2.0.2 (or error – undefined method time_zone)

Problem
You are developing on the latest version of Rails (2.1), but your production server for deployment uses version 2.0.2 (as dreamhost is using at the moment).
Solution

First change the environment.rb file to use the rails version in your deployment server
RAILS_GEM_VERSION = ‘2.0.2′ unless defined? RAILS_GEM_VERSION

You should probably be geting the error: undefined method = time [...]

No Comments » - Posted in ruby on rails by kosmas

Tuesday, May 13th, 2008

Dreamhost passenger (mod_rails) announced

Today, there was an announcement about Dreamhost, having the new Passenger (mod_rails) feature ready for use with Ruby on Rails applications.
The full announcement is here.
It should be changing the way Rails applications are deployed, making it much easier.

No Comments » - Posted in linux, ruby on rails by kosmas