getting bundler, unicorn to play nice with a rails 2.3.x-app

We have a situation here:
– a rails 2.3.5 app
– unicorn must be used as deploy solution
– rack gems 1.1.0 AND 1.0.1 installed

unicorn_rails requires rack 1.1.0
after that somewhere in the rails app rack 1.0.1 is required

So we get an error like this: “can’t activate rack (~> 1.0.1, runtime) for [], already activated rack-1.1.0”

Our solution:
– use bundler: http://gembundler.com/
– small modifications in the rails 2.3.x-files: http://gembundler.com/rails23.html
– configure and create the gem bundle
– start unicorn in the “bundler context” like this:
/usr/local/bin/bundle exec “/usr/local/bin/unicorn_rails -c config/unicorn.rb -E production”

Leave a Reply

Your email address will not be published. Required fields are marked *