Textdrive and hpricot

Web hosts have a difficult challenge with their shared servers. Unlike a dedicated box or a virtual private server, they can’t let users install just anything, because stability for everyone is at stake.

I needed the amazing hpricot gem for an app I’m testing on textdrive. It’s a native gem that requires a compile step to install, so normal users can’t do it themselves. I assumed I was stuck.

Within 24 hours of submitting a support ticket, they came through. Most other shared hosts would have no idea what to do with this. Thanks, Textdrive!

———- Forwarded message ———-
From: Help @ Joyent
Date: Mar 12, 2007 1:55 PM
Subject: Update on Your Request {68041}
To: …

Hi Bernie,

I just installed hpricot on Burnaby. Thanks for hosting with us!

Best regards,
Basil Crow

Automatic Translation

I’ve noticed quite a few of the backlinks to my postings are in a variety of languages. I speak only English and a little bit of broken German, but one of the wonderful things about the Seattle area is we have lots of people from around the world attracted here by the jobs (Microsoft, Boeing) and the beauty of the place. More than a third of the residents of my adopted hometown of Bellevue, WA were born outside of the US.

It’s a showcase of our American melting pot, and it reminds you how big this planet is.

To try and make this content more approachable outside of the US/CN/UK/AU belt, I’ve added corlosquiles nice, simple translation plugin for wordpress to the sidebar. Machine translation is still rough, ugly, and messy. But it’s getting better, and I’m amazed at what’s possible today.

How useful is this automatic translation to you? (in English, if you want me to really know. :) )

An OpenID screencast for developers

Simon Willison’s “How to Use OpenID” screencast did a lot of good — raising the awareness of OpenID and how it works for users. Today, the major bottleneck is getting more web applications to support OpenID logins.

Here’s a screencast and a set of resources targeted at that, with a focus on Rails but some general applicability.

http://leancode.com/openid-for-rails/

It’s not quite as polished as Simon’s and I tripped on a few things — e.g. OpenID Identifier — but check it out and feel free to forward it on to anyone who might want a deeper picture of how OpenID does what it does.

8 Steps to your first OpenID enabled app

openid_login_generator isn’t the only game in town for creating an OpenID-enabled Rails application, and it’s certainly not the best for real-world apps. But it is the simplest. The generator doesn’t even generate migrations for you, yet it’s only 8 steps to your first OpenID enabled app (ok, you had to install ruby, rails and sqlite3 first). Here’s a cheat sheet length tutorial.

$ rails your_app -d sqlite3; cd your_app
$ sudo gem install openid_login_generator -y
$ script/generate openid_login openid_account
$ ${EDITOR} app/controllers/application.rb
  require_dependency "openid_login_system"

  class ApplicationController < ActionController::Base
    include OpenidLoginSystem
    model :user
$ script/generate migration create_user_model
$ ${EDITOR} db/migrate/001_create_user_model.rb
  def self.up
    create_table :users do |t|
         t.column :o penid_url, :string
    end
  end

  def self.down
    drop_table :users
  end
$ rake db:migrate
$ script/server

Now browse to http://localhost:3000/openid_account/login and test your new openid login-enabled app. You’re good and ready to add “before_filter :login_required” to controllers to limit access. See the readme for more.

OpenIDAuthentication tutorial

DHH’s OpenIDAuthentication plugin for Rails is evolving and progressing quickly. Over the weekend, David updated the plugin to no longer assume an overloaded login form.

Removed open_id? as the idea of using the same input box for both OpenID and username has died — use using_open_id? instead (which checks for the presence of params[:openid_url] by default) [DHH - Revision 6631]

This morning, Ben Curtis put up an excellent, short tutorial on using this plugin on an existing site.

It’s wonderful having the creator of Rails working on OpenID. :) The design of DHH’s plugin is small, simple and clean — it doesn’t rely on a lot of generated code like openid_login_generator and has a much cleaner abstraction on top of ruby-openid, as compared to Eastmedia’s OpenID+Consumer plugin/generator.

The barriers to implementing OpenID for a Rails site are falling quickly.

Updating this site with wordpress

Apologies if you got several old postings in your feed reader this morning.

When Feedsparks was released, this blog was hosted on Textdrive. But, unfortunately, the server there has been up and down a lot through late 2006 and early 2007, and it chose to go down for a bunch of hours at that key time. So I did an emergency move to my dedicated server at aplus.net. As it happens, then aplus had a network problem which caused them to not route packets to the server for 6 or so hours. So, again at a bad time, the blog had some frustrating downtime.

Two lessons: (1) Host small blogs at a blog-specific host like blogger (like http://berniethompson.com/ is)– there’s been virtually no work to do to keep that running, and now with custom domains, you can still get the SEO benefits you might be looking for (2) If you do self-host a blog, make sure to have some kind of site monitoring going (which I did), also including checking the page for some keyword that should always be there if the page is loading properly, and separate feed monitoring with feedburner feedbulletins (which I didn’t, causing the blog to be down much longer than it needed to be).

But, in any case, this all made for a good excuse to move to update the blog. To the latest version of wordpress (2.1), and the site template. “veryplaintxt” is a simple, widget-friendly template with configurable fonts and column settings. It has some problems (e.g. no comments on Pages, which I had to fix). Anyone hate it?

At the same time, all plugins were upgraded. Some were dropped (e.g. translation links), making the right sidebar a little less crowded. Drop a comment if you miss any of those.

The blog was also upgraded to the WordPress Feedburner Plugin 2.2. The previous version exported a separate, special feed URL from the site, which you would give to Feedburner. Then your ‘real’ feed URLs would be redirected to Feedburner’s groomed versions. The new plugin introduced a change where you just provide your real feel URLs to Feedburner, and the plugin (through some magic) will special case those requests. So you have to re-configure where Feedburner grabs your feed.

Which gets us to another problem. Even though the posting dates don’t change (and the original dates are still visible), Feedburner treats your new feed address as a bunch of updated posts, and sends them all out again. So my 58-or-so readers (thankfully, the readership here is still, um, exclusive ..) all got my last 10 postings re-copied to their feed readers. Yuck. This seems to be a problem that the plugin or, more likely, feedburner must solve.

So, apologies for the multiple posts if it affected you. And anyone know of a way I could have avoided it?