Saturday, June 9, 2012

BrowserID with Ruby and Sinatra

I have been playing with Mozilla's browserid (soon to be called Mozilla Persona), which is a service to manage authentication with your email address as the login. I am using the ruby gem called sinatra/browserid to access it. When moving my code to a new computer, I started getting these errors:
application error TypeError at /_browserid_assert can't convert nil into String file: common.rb location: initialize line: 148
It seems to be a problem with a change in ruby 1.9.3 which returns a single res instead of a res, body pair. I found a fork of the gem that fixes this problem. These are the commands to install the forked gem from github:
git clone gem build sinatra-browserid.gemspec sudo gem install sinatra-browserid-0.3.1.gem
(omit the sudo if you use rvm).

1 comment:

  1. Thank you so much Kristian! I wish the original creator would merge this repo with his.