Stolen Mac Laptop W88105B2YJZ 7

Posted by Ben Reubenstein Thu, 22 Jul 2010 15:44:00 GMT

This morning I showed up at Xcellent Creations, Inc. ready to rock out some code. Our company has been fortunate enough to be very, very busy lately (probably why I have not posted lately), and early mornings/late nights are the norm. I try to keep a good work / home life balance, and last night I made a real effort by leaving my laptop (serial W88105B2YJZ) at the office. This morning I was greeted by a slew of Denver Police Officers, who let me know there was a break in. Two buildings, several offices.

We were lucky in that no monitors were stolen, the Mac Pro was left in tact, and a laptop in a case was left. The stolen items included:

  • MacBook Pro Serial Number W88105B2YJZ
  • iPod Touch 8GB
  • G1 Android Phone
  • A Borrowed DVX100a Panasonic Camcorder

Needless to say the entire company and myself feel extremely violated. If you happen to be using that laptop, please know it is stolen ;).

Reasonable precautions were taken with our office door and the outside door being locked. The laptop data was secured by password, and any crucial data such as code is safely in github or our SVN repositories. I will be contacting customers today to address any concerns.

Our company as a whole will be implementing new policies and reviewing the office situation and if a move is necessary. Rest assured that we are taking this situation extremely seriously.

Facebook and Facebooker Fixing server returned nothing (no headers, no data) 14

Posted by Ben Reubenstein Fri, 16 Apr 2010 20:15:00 GMT

Recently our team spent several days debugging a problem connecting to the Facebook API from our production servers running CentOS. Everything worked perfectly in development for our iFrame application and our Facebook connect code. After exhaustive debugging, it turned out to be an issue with the headers Curl was using. To fix, edit facebooker/lib/facebooker/service/curl_service.rb and add line 6 below.

Hope this helps someone avoid this issue in the future.

Array of nil results returned by Thinking Sphinx 5

Posted by Ben Reubenstein Thu, 31 Dec 2009 16:02:00 GMT

Sphinx combined with Thinking Sphinx is a powerful full text search solution for Rails. After using it on several projects, when it started returning an array of nil results, I was perplexed to say the least. After adjusting the model I found the issue to occur when I set an alternate primary key in the model using set_primary_key. When that is set, Sphinx works returning the proper IDs, the SQL executes properly, but the search method returns [nil, nil,....].

According to the Sphinx documentation:


To fix, set_sphinx_primary_key must also be set. In this particular case the table still had the standard id. Do the following in the model:

  set_primary_key :other_primary_key
  set_sphinx_primary_key :id

Introducing One Time use links 6

Posted by Ben Reubenstein Mon, 16 Nov 2009 23:56:00 GMT

I have had the idea for for a while now. It was a simple enough concept that it took me about one day to realize it while attending Developer Day Boulder. This simple tool lets you share a one time use link. Example use cases:

  • Share a login / password
  • Share a credit card number

Feedback is always appreciated. Would love to know what you would use it for or potential new features.

Urchin 5 to Urchin 6 Upgrade How To 5

Posted by Ben Reubenstein Wed, 09 Sep 2009 14:04:00 GMT

Over the past several weeks I have been struggling with getting Urchin 5 upgraded to Urchin 6. Much has been learned, here are the steps:

  1. Install Urchin 6. The wizard for this is fairly straightforward. Prior to starting the installer be sure to have mysql installed, a database created for urchin, and a mysql user that has full permissions on the Urchin database.

  2. If Urchin 6 resides on a new server, copy the entire urchin 5 directory to the new server. I tried to get fancy with NFS mounts, and it was a world of hurt when trying to import. Copying the data will ensure no issues. The fastest way is to use rsync, here is an example command to do it over SSH:

    $ rsync -vaz --rsh="ssh -l USER" /PATH/TO/urchin5/ \ URCHINSERVERHOSTNAME:/PATH/TO/urchin5_files

  3. Export the urchin 5 setup data on the urchin 5 box. This includes profiles, users, etc... Note you must always run commands from the directory in which they reside.

    $ cd /YOUR/URCHIN5/INSTALL/util
    $ sudo ./uconf-export > /home/YOURUSER/

  4. If Urchin 6 is on another server, copy the file to the new server. Import the data.

    $ cd /YOUR/URCHIN6/INSTALL/util
    $ sudo uconf2sql -f /PATH/TO/

  5. Finally import the actual analytics data for all profiles. It is crucial that you use the -z option if your copy of Urchin 5 had archiving turned on. If you don't, the import will only grab recent data. If you have a lot of data the task can take a while, consider running the command in a screen so you can log out of the box and it will continue running.

    $ cd /YOUR/URCHIN6/INSTALL/util
    $ sudo ./convert-u5data -d -z -c /PATH/TO/urchin5/

Urchin 5 to 6 documentation from Urchin.

Rails 2.3 Upgrade Tips 4

Posted by Ben Reubenstein Mon, 16 Mar 2009 16:53:00 GMT

Today Rails 2.3 was pushed. Upgrading some applications created a couple of issues.
NameError (uninitialized constant ApplicationController)

In previous versions of Rails, the generator would create application.rb for the Application Controller. In 2.3 the file is now properly named application_controller.rb.

NameError (uninitialized constant ActionController::Caching::Sweeper)

This is a bug that is part of the 2.3 release. The fix is was supposedly resolved according to this ticket previous to 2.3 but something is still off.

$PATH when Using Passenger (mod_rails) aka BJ does work with Rails 4

Posted by Ben Reubenstein Wed, 18 Feb 2009 00:25:00 GMT

Phusion Passenger has become my default Rails setup lately. Today I had issues when using BJ on a production box, and it came down to two issues. The first was Bj not working quite right with Rails Time. The gist of that fix is to change every reference of to The next however was tougher to track down. I was getting error messages in my email:

no bj found in ["RAILS_ROOT/script", "/sbin", "/usr/sbin", "/bin", "/usr/bin"]

I jumped into the console, and ENV["PATH"] reported the correct paths, including /usr/local/bin. It turns out that passenger inherits the $PATH of apache, so I manually set the path in environment.rb and my problem was solved.

ENV['PATH'] = "#{ENV['PATH']}:/usr/local/bin"

RHEL5 Getting The Rails Console Working 2

Posted by Ben Reubenstein Tue, 10 Feb 2009 16:42:00 GMT

If you compile Ruby from scratch you may get this error when starting a script/console session:

`require': no such file to load -- readline (LoadError)

To solve this you need to install the readline ruby extension. Here I assume you are using the 1.8.7 Ruby.

sudo yum install ncurses-devel readline-devel
cd ~
mkdir src
cd src
tar zxvf ruby-1.8.7-p72.tar.gz
cd ruby-1.8.7-p72.tar.gz/ext/readline
ruby extconf.rb
sudo make install

SWFupload with Flash 10 Fix 3

Posted by Ben Reubenstein Tue, 25 Nov 2008 20:58:00 GMT

It took me a while to reproduce errors that users were reporting with the SWFUpload plugin, but I finally traced it to users using Flash 10. Flash 10 changes how javascript and flash are allowed to interact thus breaking the html upload button that calls javascript to present the file choosing dialog box. If you run SWFUpload in debug mode you will get Error #2176. To fix:

  1. Download SWFUpload v2.2.0 Beta 3
  2. (optional) Backup your swfupload.js and your swfupload.swf file
  3. Unzip and overwrite your existing swfupload.js and your swfupload.swf file. You might need to rename the swf to match your swf name. If you try the uploader at this point you will receive a javascript error: SWFUpload Could not find the placeholder element.
  4. Create a button image that will be used instead of the upload html input.
  5. Adjust your JavaScript to include the following attributes:

    button_placeholder_id : "spanSWFUploadButton",
    button_image_url : "",
    button_width : 61,
    button_height : 22
  6. Add a span tag with the element ID you specified above.

Update: In order for your image to work properly, it must have 4 states. Refer to this post.

If things are still not working for you, be sure to turn debug: true and review the javascript error log. Hope this helps others.

Android Speed Test 2

Posted by Ben Reubenstein Sat, 25 Oct 2008 06:44:00 GMT

The Android G1 phone is in my hands. Although it definitely lacks the polish of the iPhone, it certainly has huge growth potential, especially for developers. Xcellent Creations has finished up the web based Internet speed test, iNetwork Test for Android web edition. The native version is in the works and we hope to have it pushed to Market Place soon.