Upgrade Ruby Enterprise Edition

Posted: February 21st, 2011 | Author: | Filed under: posts | Tags: , | No Comments »

A security update for Ruby has been released to respond to multiple vulnerabilities. All versions of the interpreter are affected, including the Ruby Enterprise Edition interpreters.

Fortunately, it’s easy to upgrade with RVM:

Tell RVM to upgrade your specific REE installation to the latest:

rvm update                                                   #upgrade RVM
rvm upgrade ree-1.8.7-2011.02 ree-1.8.7-2010.02              #upgrade REE

Accept Y to all options to move elements of your current install.

Then reset REE to be your default:

rvm ree-1.8.7-2011.02
rvm --default ree-1.8.7-2011.02

Following this, confirm that the new install of Ruby is active for your shell session (which ruby). Then, you will likely need to install bundler again to make sure you have 1.0.10 for the upgraded copy of gem 1.5. Also, run bundle install from the app root to make sure your gemset is up to spec.

Despite telling the upgrade process to move everything, I still needed to reinstall Passenger (3.0.2) and reconfigure it for Apache:

gem install passenger

With this reinstallation, you’ll also need to edit your Apache config file (on Mac OS X: /etc/apache2/httpd.conf ) to point to the new Passenger gem.

Restart Apache from System Preferences > Sharing > Web Sharing and you should be good to go.

Connecting a Windows VM to a Mac-based localhost Ruby on Rails site (Passenger)

Posted: January 20th, 2011 | Author: | Filed under: posts | Tags: , , , | 5 Comments »

Supporting Internet Explorer for your web app is a pain. At least, trying to test your Ruby on Rails (or other localhost-based site) in IE while developing on the Mac should be easy, given the prevalence of virtual machines. Right?? You’d think. However, trying to setup our front-end developer to access a local instance of Passenger running on Mac OS X from a Windows VM proved to be more of an issue than it needed to be. Adding to this, most of the top Google results for relevant keywords for this configuration made the process more overly difficult than it needed to be.

So, to help ease your pain in testing your Mac-based Rails site from a Windows virtual machine, here is an easy configuration for the three main VMs.

We need to do two main things:

  1. Trying to serve port-based or subdomain-based sites over to the Windows VM is going to be more challenging. Let’s make things easy – we’ll set the default http://localhost site for our Mac to our Rails site.
  2. We need to get the VM’s network to communicate with the Mac’s network correctly so that we can access this site.

On my team, we’re using Passenger on the Mac (running on top of the Mac’s base install of Apache). We’re using Passenger Pane to configure Apache easily. We also have this hooked into RVM, but that won’t be relevant to what we’re doing here. For the purposes of this post, I’ll assume that you have Passenger successfully serving a site that you can access via http://somedomain.local I’ll also assume that for whichever VM you’re opting to use, you have Windows installed and running in it.

** Do yourself a favor. Make sure that VM Ware Tools, Parallel Tools, or VirtualBox Guest Additions are installed – this ensures that the network connectivity will work as expected.


Let’s get http://localhost serving our Rails site

At the bottom of /etc/apache2/httpd.conf when using Passenger Pane, you’ll find the following configuration:

<IfModule passenger_module>
  NameVirtualHost *:80
  <VirtualHost *:80>
    ServerName _default_
  Include /private/etc/apache2/passenger_pane_vhosts/*.conf


To make our Passenger site the default localhost site, go into passenger_pane_vhosts/, view the Apache config file for the site you want to be the default, and you’ll see something along the lines of the following:

$ cat yoursite.local.vhost.conf
<VirtualHost *:80>
  ServerName yoursite.local
  DocumentRoot "/Users/username/rails/yoursite/public"
  RackEnv development
  <Directory "/Users/username/rails/yoursite/public">
    Order allow,deny
    Allow from all


Copy the lines from inside the VirtualHost block and paste them back into /etc/apache2/httpd.conf so that it looks like the following:

$ cd ..
$ sudo mate httpd.conf
# Added by the Passenger preference pane
# Make sure to include the Passenger configuration (the LoadModule,
# PassengerRoot, and PassengerRuby directives) before this section.
<IfModule passenger_module>
  NameVirtualHost *:80
  <VirtualHost *:80>
    ServerName _default_
	DocumentRoot "/Users/username/rails/yoursite/public"
	RackEnv development
	<Directory "/Users/username/rails/yoursite/public">
	  Order allow,deny
	  Allow from all
  Include /private/etc/apache2/passenger_pane_vhosts/*.conf


Restart Apache by going to System Preferences > Sharing and uncheck & recheck Web Sharing.

Also, if you’re using VMWare Fusion or Parallels, note the IP address that’s shown here.

Configuring VirtualBox

Let’s start with Virtual Box, which was the biggest pain to configure. Not because there’s a lot of work, but because they one critical detail doesn’t seem to be well known (most of the posts you’ll read online try to guide you through using the command-line network configuration tool). I should note that this was my first real opportunity to use Virtual Box, having only used Parallels and VMWare Fusion beforehand. It’s a little rough around the edges in a few places, but overall very impressive.

1) First, ensure that network settings for VirtualBox should be set to NAT – no port forwarding needed


2) Now, here’s what took a while to dig up: VirtualBox connects to the Mac’s localhost (thanks to this forum post) That is, just typing that into IE within the VM should connect you to http://localhost running on the Mac.


Configuring Parallels

1) For Parallels, you want to make sure that your VM is running on a Shared Network.


2) If you’re setup with this network configuration, you should be able to directly access the local IP address of your Mac, as shown in the System Preferences > Sharing screen:


Configuring VMWare Fusion

1) VMWare Fusion is much like Parallels. Configure your VM to “Share the Mac’s network connection” via NAT.


2) If you’re setup with this network configuration, you should be able to directly access the local IP address of your Mac, as shown in the System Preferences > Sharing screen, as with Parallels.

Hopefully, if you’ve made it to this point, for your respective VM, you have IE accessing your Passenger-based site. Success!


Hopefully, at least now you’ll be able to spend your time on all of the issues that poor users confined to IE are suffering through and get bug fixing quickly.

Resolving the MySQL Homebrew Install Issue

Posted: November 30th, 2010 | Author: | Filed under: posts | Tags: , , | 6 Comments »

We switched from using MacPorts to Homebrew for package management on our Mac OS X development machines. Recently, when building two machines and using brew to install MySQL on them, we ran into an issue where MySQL would only partially install and we’d get a mysql database with an empty user table. This was with mysql-5.1.52:

mysql> use mysql;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> select * from user;
Empty set (0.00 sec)

We tried a couple of things to solve this, but were not able to come up with a workable way to insert a root user, as you can’t create users when running with the –skip-grant-tables option.

I also tried the binary download from MySQL.com and hit the same snag.

After a couple of rebuilds and testing with a fresh install of Snow Leopard, we traced the issue back to the following error message from the MySQL setup script:

Installing MySQL system tables...
ERROR: 1049  Unknown database 'mysql'
101121 19:21:38 [ERROR] Aborting
101121 19:21:38 [Note] ./bin/mysqld: Shutdown complete
Installation of system tables failed!  Examine the logs in
./data for more information.

Error 1049 proved to be the key to solving this. It led me to this MySQL bug report, which discusses that this error can be generated when the default temporary directory doesn’t exist.

Passing the /tmp temporary directory to mysql_install_db as a param seems to resolve error 1049 and allow us to get the default mysql system database setup with a working root user.

Most of the instructions for installing MySQL with Homebrew don’t mention any additional params needed, which leads me to believe this is something recent in the recent builds of MySQL. We didn’t have this issue when installing MySQL on our other Snow Leopard machines (which have 5.1.49). However, this is the sequence of commands that we found that worked for us – hopefully, this will help others hitting similar snags:

brew install mysql
mysql_install_db --user=mysql --tmpdir=/tmp
mysql.server start
#server must be running first

Hey, what caused that ActiveRecord::ConnectionAdapters::TableDefinition gooblygook on my table?!

Posted: November 24th, 2010 | Author: | Filed under: posts | Tags: | No Comments »

Maybe you’ve run into this, too? You’re taking a look at the tables generated by your Rails migration and you see this really odd column.


Here’s another look:


Searching the web didn’t turn up much in this case, so I thought I’d post what I found when figuring out the root cause.

See the issue in this migration?

No? I didn’t the first time I looked, either.

It’s the comma – at the tail end of the last column definition before t.timestamps.

This little typo doesn’t look like much, but it’s the cause of that wacky column.

Here’s what the table looks like when you run the migration with the comma:

And here’s what it looks like when you fix your typo:

Ah! Much better.

As for creating a migration to fix this, I just resolved the typo and dropped the column manually. It’s a little difficult to script this because the column name will be different in each database, so, it’s some variation of this (the part in bold on each database that the original typo ran on):

ALTER TABLE `friendships` DROP `#<ActiveRecord::ConnectionAdapters::TableDefinition:0x10245fd78>`;

Hope this helps someone else avoid wasting time on this!

Greetings from Ireland…

Posted: November 23rd, 2010 | Author: | Filed under: posts | Tags: , | 1 Comment »

When I last posted in June, we were heading to Europe to continue growing the FanGamb product. I’ve taken a bit of a vacation from blogging while I’ve been focusing on all that’s been involved in this.

I moved to Dublin in July and we’ve been rapidly rebuilding our team and the product. I’ll be able to go into more detail on the changes when the product re-launches in the near future, but things are going well. We’re having a great time in Ireland and have really enjoyed working abroad.

Since I can’t yet delve into the details of the move and transition, or the next version of the product, I’ll be focusing for a while on what it’s like to working abroad, and also some topics that I haven’t given as much “airtime” to in the past. Most of my posts to this point have been on various startup/entrepreneurship topics, which I’ve enjoyed writing about. A large part of my job, though, as VP of Product & Technology for Three Screen Games, has me deeply involved with both the technical product development and customer-centric product management efforts. These are petty broad areas and I look forward to exploring them further through future blog posts.

And of course, an update to the seed stage accelerator list is overdue – it’s amazing how this space has continued to grow in the last few months.

Anyway, it’s good to be back.

Exciting FanGamb Changes, Moving to Europe

Posted: June 24th, 2010 | Author: | Filed under: posts | Tags: , , | 6 Comments »

It’s been just over the one year mark since we started Three Screen Games and FanGamb. I left IBM on May 1, 2009, and we began the DreamIt Ventures program on May 18, 2009. It”s been an interesting and crazy year. We’ve learned much about what it takes to make a successful social game, and a successful startup. And we’ve positioned ourselves and our team for much greater success.

Part of what we’ve learned over the last year is that the industry of social gaming is still in its infancy and there is a host of new models to be experimented with. We have some exciting things in the works and as a result, will be moving to Europe later this summer to continue developing our product and business. We can’t yet share all of the details on why we’re making the move, but I’ll share more as soon as I”m able.

It’s certainly quite a change and not one that we expected a year ago, but we’re confident that it’s the best direction for our company and are extremely excited about the next phase of FanGamb. Personally, it should prove to be a valuable experience, working internationally and experiencing the European technology and startup communities.

So, if we”re moving to your part of the globe, or you’re just passing through, give us a shout! We’re very much looking forward to meeting new folks and saying hello. For everyone else, I’ll share the experiences through the blog and photos on my Flickr account.