I'm currently studying Ubuntu Server administration, and also HTML/CSS. When it comes to the application logic I can see huge advantages in using a reputable CMS like Drupal or Joomla. I find though that both of these are implemented in PHP. I wish to study Rails as Ruby makes a nice switch from the ubiquitous C-style syntax. With PHP dominating the majority of web applications released in the last few years; should I just bite the bullet and learn it along with CodeIgniter, or should I go with Ruby on Rails and work with one of the smaller compatible Rails CMSs out there?
There's no reason to choose one over the other when you can learn both.
You might have to pick one now, and the one you pick should provide the most value for you in the least amount of time (for example, if most of your jobs are in PHP, continue to focus on getting better in PHP and PHP-based systems). However, if you have time, you should continually learn new languages, techniques, and paradigms - it will only make you a better developer.
If you are more or less an experienced programmer, go with Rails and learn something new and different, even more if you plan to re-use your code as a freelancer. Also take a look at HAML and SASS (yes, HTML and CSS are ancient and outdated as PHP)