Gravatar

Geoff Evason

Setting a Capistrano Variable from the Command Line

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

Northern Beaches Toastmasters

Domain Name Registration API Plugin for Rails

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

New Developments For The Wedding Website Business

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.

Fox News : War Games

I came across this article on digg. Its about a Glenn Beck program on Fox News called ‘War Room’. The article provides an interesting read (though a bit long). The embedded fox videos contain a fair bit of fear mongering, a la… <The government isn’t upholding the values of the constitution and the militias (or bubbas) may need to fight a new civilwar in 2104>

The videos will mean different things to different people based on their views. The reason I’m writing THIS post is to point out a glaring error in Fox News’ fact checking.

War Room Scenario #2 paints the very bleak outlook :

50 million people worldwide are unemployed. There are riots in the streets.

The problem is, as of 2007 there were 180 million people unemployed!

Just image the carnage that would be unleashed if 130 million people got new jobs!

Safari : The Cookie Monster

safari cookie monster

Safari has been causing me much grief recently.  It would seem that I’m not the only one, and so far I’ve been unable to find any suggestions other than deleting all your cookies and and resetting Safari (a solution which doesn’t actually work) .

I seem to constantly get logged out of various web apps when using Safari, including Facebook & Gmail.  With Gmail I usually get an 400 error message or a warning the the header is too long. Sorry to anyone who was hoping to read a solution here. I don’t think anyone has one at the moment.  I really just wanted to post the image and vent a little…

 

 

GiveDo

I’m at startup camp sydney now (#scs on twitter) and we’re making an app called Givedo

First off, I’m kind of amazed that givedo.com was available.

This was born from the idea of ‘Search for the cure’. Using a google custom search we can collect revenue from adsense for search.

In the vein of not being evil, we figured that we’d set up a platform for charities to quickly and easily build their own branded search engine and funnel search ad revenue to them.

So that is givedo!

Upgrading an app from Rails 2.1 to Rails 2.2.2

Here is a summary of a few of the problems I encountered while trying to upgrade an app from rails 2.1 to rails 2.2.2

Getting my dev code to run

First, to update the rails code:

 > rake rails:freeze:gems

The first time I tried to run the app I got this error:

vendor/rails/activesupport/lib/active_support/dependencies.rb:445:in `load_missing_constant': uninitialized constant Inflector (NameError)
Accessing the inflector changes, so as described here you need update APP/config/initializers/inflector.rb so it looks like this:
ActiveSupport::Inflector.inflections do |inflect|
  ...
end

In my case, I was also using the ActiveMerchant plugin which needed updating for the same reason

script/plugin install git://github.com/Shopify/active_merchant.git --force

According to gusg.us, HAML needs to be at 2.0.4.   I didn’t see any problems in my testing but I didn’t want to try my luck so I updated HAML too.

sudo gem update haml

update my environment.rb gem requirement

config.gem "haml", :version => "2.0.6"
Then run
rake gems:unpack:dependencies

Production

While deploying to a staging server I got this error:

initializer.rb:514:in `send': undefined method `cache_template_loading=' for ActionView::Base:Class (NoMethodError)

As described here, to fix this, just update your APP/config/environments/production.rb (and staging.rb) file by removing the following:

config.action_view.cache_template_loading

Overall, it wasn’t too painful an upgrade…

I didn’t run rake rails:update. That may have fixed some of these things on it’s own, but my understanding was that that wasn’t needed anymore…

Why Do GoDaddy and Other Domain Registrars Suck?

I’m evaluating different domain name options for something I’m working on.  Typically, I register domains names with GoDaddy because they seem to be the cheapest.  Yesterday, I registered the domain wedding-website.ca as a test.  I wanted to compare writing instructions about how to buy a domain name vs. using the API vs. a reseller front-end.

My step by step instructions are now at step 13, and that’s before I get into any DNS alterations.

13 STEPS!?!?   What kind of e-commerce sales funnel is 13 steps?  I’m pretty sure I filled out my details 3 times and created a least 2 accounts. (I’m not sure – I’m still a little dizzy from the whole thing).  I do have about 5 long numbers now which I’m sure I’ll have to re-enter somewhere, at some point…

Many of the steps in the instructions I was tracking included things like ‘completely ignore everything on the page and just press the very tiny button at the bottom (the one hidden under the big button)’.  The 13 steps actually excludes some of the extra steps I had to take because it’s a .ca domain!!  Okay, so intructions through GoDaddy aren’t going to be part of my solution.  Register.com and Dotster.com have slightly cleaner processes (but not by much)

GoDaddy, Register, and some others offer resale program and APIs. The APIs are generally completely undocumented, and you get no indication of what is available (or even what technology is used) before they ask for the steep annual fee.  Register.com has the best API (it’s xml based) I’ve see, but so far it seems to be a big flat convoluted set of URLs.

Now, I’m sure most of these companies are making lots of money, I just wanted to rant about how annoying I find it all to be from my perspective as a consumer.

Cool Flash Fonts Delivered By FontBurner

While trying to provide some more styling options for the wedding website builder I’m working on I came across a very cool and easy to use flash font tool.

FontBurner is essentially a hosted sIFR solution which makes getting cools flash fonts as easy as a simple copy and paste.

To get the headlines in this blog post to be as they are, all I needed to do was paste this code:

 

<link rel="stylesheet" href="http://www.fontburner.com/css/fontburner.css" type="text/css" media="screen" /> 

<link rel="stylesheet" href="http://www.fontburner.com/css/fontburner_print.css" type="text/css" media="print" /> 

<script src="http://www.fontburner.com/fontburner.js" type="text/javascript"></script> 

<script type="text/javascript" src="http://www.fontburner.com/js/white/action_man_extended.php"></script> 

<!-- sIFR fonts delivered by www.fontburner.com -->

 
If you need flash fonts, check them out: