November 27th, 2009

We’ve been pretty busy recently workign on some great new wedding related features. In particular we launched wedding pictures and wedding forums.

We’re pretty excited about this launch. We did a lot of really great thigns in the code, so that users can comment/like/save pretty much any of the wedding pictures, or forum posts, and it’s all extremely DRY and RESTful.

We may try to extract some plugins from the latest launch, but at the very list I’ll write a post about the tech details of it.

0
Posted in 1 |
July 14th, 2009

We had our biggest launch yesterday since starting our wedding website a couple years ago.  If you are planning a wedding, check out the new tools, including a wedding checklist, wedding budget and wedding vendor search and comparison.

We’re pretty excited about these new features – and hope they’ll help a lot of people plan their weddings (or other big events)

0
Posted in 1 |
May 26th, 2009

I recently upgraded an app to rails 2.3 and on many pages on my local machine the top of the HTML body included something like this:


Set-Cookie: _myapp_session_id=BAh7B...; path=/; HttpOnly

I couldn’t figure out what was happening until I found this forum post which explained that the problem was related to passenger 2.0.6. To fix the problem I just needed to update the version of passenger I was running.

To update passenger (on a mac) was pretty simple. Just run the following 2 commands:


sudo gem install passenger
sudo passenger-install-apache2-module

Depending on how you set up your local apache instance, you may also need to update the config. I needed to update /etc/apache2/httpd.conf to


LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.1.2/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.1.2
3
Tags: , , | Posted in tech |
May 6th, 2009

I was working on getting the Swiff uploader working with a wedding vendors application and was getting the following javascript error:


__flash__argumentsToXML is not defined

After banging my head for a while (the exact same code was working fine on another website) I discovered the problem. It was a really silly oversight on my part. I didn’t have the file Swiff.Uploader.swf in the right location!!!

Make sure that when create a swiffy object you have a the above swiff file where you set it in the path:


    $('upload-fallback').removeClass('hide');
  	var swiffy = new Fancyuploader2($('upload-status'), $('upload-list'), {
  	...
        /* This is the important bit re: this blog post */
  		'path': '/swf/Swiff.Uploader.swf',
  	...
  		'target': 'upload-browse-images', /* This is for flash 10 */
  		'onLoad': function() {
  			$('upload-status').removeClass('hide');
  			$('upload-fallback').destroy();
  		}

  	});
0
Tags: , , | Posted in tech |
May 4th, 2009

I recently upgraded one of my apps from Rails 2.2.2 to Rails 2.3.2. It was actually a really easy upgrade, but there were few little gotchas I had to watch out for, so I thought I’d share my experience.

Upgrading Rails

I imagine there is probably a better way to do this, but since I change the version of rails so infrequently I’m not sure. (If there is a better way, please let me know). My flow is as follows:

Install the new version of the rails gems:


sudo gem install rails

Branch your app


git branch newrails
git co newrails

Remove the old version of frozen gems


git rm -rf vendor/rails

Update your config/environment.rb file to the new version of rails:


RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION

freeze the new gems


rake rails:freeze:gems

Please note, that if instead of installing the new gems and freezing them from your local gems, it looks as though you need to be careful if using rake rails:freeze:gems. You can read more about it in the official post or in this post which I found more understandable.

Testing Your App

The first and most obvious error you will run into is this:


uninitialized constant ApplicationController

This is because as of Rails 2.3 application.rb is now application_controller.rb. To fix this just do


git mv app/controllers/application.rb app/controllers/application_controller.rb

The next error I got was


undefined method `relative_url_root' for #

I narrowed this down to a stylesheet_link_tag call. I got around this by updating the asset_packager plugin, and updating HAML to 2.0.9. By the way, if you’re not using asset packager, you should be.

That’s it! It overall was a very easy upgrade that took much less time to test than my rails 2.1 to rails 2.2.2 upgrade.

Here are some other rails 2.3 gotchas to watch out for courtesy of thoughtbot.

3
Tags: , , | Posted in tech |
April 6th, 2009

Recently we move our wedding website application to ec2 servers.  Part of doing so meant updating DNS entries.  5 days after changing them, I’m still seeing traffic to the old servers… :-(

Part of moving to ec2 required us to move to a 3rd party DNS solution.  We chose DynDNS.  Their offering is pretty good, but I’m less then impressed with their support.  [their response time is about 24 hours and when I asked why I'd still be getting traffic to the old IP and what I might do about it they basically said "that's not our problem"...]

Anyway – before changing hosts I set the DNS TTL to 20s. I was surprised to see traffic to the old IP a day later. On the second day I got worried. After a few more days I was even more so…

After looking through the logs a bit more it seems that almost all of the traffic in the last two days is coming from the IP 72.30.79.108 – which turns out to be one of yahoo’s crawlers…

So, Yahoo, if you read this, please make sure your crawlers respect DNS records… Otherwise you’re getting stale data…

0
Tags: , | Posted in tech |
March 27th, 2009

It took me a little while to find a solution for this, so I thought I’d post it.

I was cleaning some deployment dirs and wanted, just for this instance, to only leave 1 release as opposed to the 5 releases that capistrano leaves by default. Keep in mind this was across about 6 apps and 2 stages for each.

Option 1: Add the following to the deploy.rb files:


set :keep_releases, 1

That would require changing them all back afterwards.

Options 2: Set the capistrano variable from the command line:


cap deploy:cleanup -s keep_releases=1
0
Tags: , | Posted in tech |
March 4th, 2009

If you’re in the northern beaches of Sydney and are looking for a fun & supportive way of enhancing your public speaking, you should check out the harbord diggers toastmasters club.

0
Posted in life |
February 26th, 2009

If you’ve ever had an app where you want to allow users to purchase a domain name, you’ve probably felt the pain of trying to interface to a registrar.  Although some have APIs, my search found that most were hard to interface to or poorly documented.  Many even required signing up as a partner (and paying a big fee) before you could even get documenation.

After much searching and experimenting I decided to go with Register.com’s XML api for my app. They offered the best API, and the easiest signup path.

I bundled the main part of the interface into a rails plugin.  The plugin is stored on github: http://github.com/geoffevason/register-api/tree/master

To install the plugin do this:


script/plugin install git://github.com/geoffevason/register-api.git

The plugin is of little value unless you have spoken to register.com and have received their API documentation. You need to register as a partner (it’s free) and have the IP of your dev machine whitelisted for testing.

Most of the info on use is in the readme in the plugin. You can call any of the Register.com API methods by calling Register::API.


# A call to the API looks like this
# Register::Api::Call(params)

# Example to check if the domain name google.com is available
Register::Api::Check( :tld => 'com', :sld => 'google' )

The plugin also contains a few helper methods and classes. If all you want to do is let people search for an available domain, and purchase it, then everything you need is in these helpers. Some important logic remains in my controllers, but if you have any questions, let me know. geoff [a] evason.name

2
Tags: , , , | Posted in tech |
February 25th, 2009

There have been a bunch of developments with MomentVille recently that I’m pretty stoked about.

First, we have created a partnership with Modern Girl Invitations so that we can provide some designer wedding website themes that have matching modern wedding invitations.  :-)

Second, we’ve written guest blog post: why you should make a wedding website.

Third, we now let users purchase their own domain names! During testing I bought some neat domain names, such as www.websites-wedding.com

Finally – our legendary CTO Paul is working on a wicked-cool new way of using music on the site.

0
Tags: , | Posted in startup |