Last night I got to move CEO to its new home, a brand new machine with a fresh copy of Ubuntu Server Edition. There were a couple of gotchas (The rubygems package is outdated and gem update --system freaked out a bit. I ended up needing to manually link /usr/bin/gem to /usr/bin/gem1.8), but, for the most part, it was ridiculously easy. Here's the recipe:
- Start with a fresh install of Ubuntu
- Upload your application
- Follow these 6 commands
- Configure Apache
- Cross your fingers (Maybe that should be 1?)
sudo apt-get update
sudo apt-get install build-essential ruby-full ruby1.8-dev rubygems \
apache2-mpm-prefork apache2-prefork-dev
sudo gem update --system
sudo ln -s /usr/bin/gem1.8 /usr/bin/gem
sudo gem install sqlite3-ruby rails passenger
sudo passenger-install-apache2-module
One disclaimer: I cleaned things up a bit (combining apt-gets and gem installs), so you'll need to use your head to resolve any dumb mistakes that may have resulted.
Don't forget to follow the instructions displayed by the last command. For details on setting up Passenger (to easily serve Rails apps through Apache), check this out.
Good luck!
Update: I had to update the gems on another machine a few days ago and everything went fine. So, you probably won't need to run the fourth command.
Update: If you'd rather watch a screencast, this one's well worth your time.
No comments:
Post a Comment