How to Quickly Configure an Unbuntu/Rails Development Virtual Machine

I’m starting a new Rails project, and as usual I want a new dedicated virtual machine to keep it isolated from my other development environments. Since it will be based on Ruby on Rails, Ubuntu is my choice for operating systems. Though it’s not terribly onerous, I didn’t feel much like installing from scratch, so I found a great resource here: http://hex.io/1lda

After starting the VM and installing VMware Tools as per the site’s instructions (http://hex.io/1ldb) and excellent script (I recommend upgrading the kernel before this to avoid having to run “sudo vmware-config-tools.pl –d” again, like I had to) I used the Synaptic Package Manager to install Ruby, Rails, MySQL Server & client + tools, Git, the full version of vim, and several other packages.

Since my project will use SQL Server as the back-end database, I needed to install a suitable database adapter. Instructions for one such adapter are at http://hex.io/1ld5. As documented, specific versions of support gems are required.

The number one annoyance for me to running Ubuntu in a VM is that horrific speaker beep when doing filename completion or trying to scroll past the end of file in vim.

After some research, I found two complementary solutions. First, edit /etc/modprobe.d/blacklist.conf and add the following lines:

# turn off the PC speaker
blacklist pcspkr

This kills the beep once and for all. However it would be nice to get a visual beep, so add the following to ~/.inputrc:

set bell-style visible

There were also keyboard issues as the VM image is set to an international keyboard by default. I changed the keyboard to a Generic 104-key model and set the layout to English Canadian. No more irritating accent characters.

Here’s a nice article on configuring remote access in Ubuntu: http://hex.io/1ld8. This way the VM can be running on a host in the server room and I can connect to it using my main workstation. I particularly like the bit about allowing multiple users to access different virtual screens.

At the end of the day, I have a pretty current VM image that’s ready for Rails development action.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.