There's always that time when you need to migrate things to a new server. A happy time. Until the only Ruby app on the server refuses to work.
I'm mainly a PHP guy, so LAMP is easy to move around. Using that experience, I copied over the files, restored a local copy of the database (using MySQL as a backend), restored the virtualhost in Apache and presto! Forbidden. Wait, what?
Of course, we need to reinstall Ruby. After going through the (excellent!) installer for Ruby Enterprise Edition , and the Passenger module that comes with that, I tried again. Not suprisingly, I was greeted with a wall of errors that meant absolutely nothing to me. I went to the Redmine installation page, to the Chiliproject installation page, and both mentioned some gems that should be present. Eh well, nothing to lose, so I installed them via the gem command.
Needless to say, that didn't work. Apparently Ruby apps are sensitive to the version of libraries installed. And the solution was so simple that made me feel stupid.
The only gem you need to install is bundler. To do so, just run
#/opt/ruby-enterprise-edition-1.8.7/bin/gem install bundler
in which you should obviously replace the path. After that, just go to the physical directory of the vhost ( in my case, /var/www/vhosts/chiliproject ) and run
That will download all necessary libraries in their appropriate version. So simple, and yet so foreign!
Hope this helps someone out. Article pic from here.