… of many things …

March 14, 2009

Sinatra meets S5

Filed under: Ruby, Sinatra, Software — Tags: — Jason Rogers @ 10:18 pm

I recently did a presentation on Sinatra at my company (RiskMetrics Group). I thought it would be apropos to do the presentation with Sinatra. To that end, I have created a project on GitHub for this called Sinatra Based S5 Presentations – SinBaSP for short.

I know the name isn’t clever, but oh well. Feel free to fork it or send me patches (with tests/specs hopefully).

February 26, 2009

Capinatra deployment

Filed under: Capinatra, Capistrano, Ruby, Sinatra — Tags: — Jason Rogers @ 11:21 pm

Another fine example of using a tool that I didn’t fully understand… not a good idea.

I spent  two days trying to figure out why my Sinatra/Passenger build was not working properly and found out that it was due to one line (19 characters) in my Capfile…

require ‘capinatra’    

It turns out that Capinatra adds an “after hook” to the deployment process of Capistrano that writes the config.ru file to your destination server.  That’s typically OK except that I wanted to tweak my config.ru file.  So, I wrote my own and assumed that would be used during the deploy.  Nope.  Capinatra writes a new one every time based on its config.ru.erb template.  Doh!

So, lesson learned (again, for the umpteen-millionth time) to know your tools.  I wonder how many times I will have to re-learn that lesson.

February 24, 2009

Capistrano failure to deploy

Filed under: Capinatra, Capistrano, Ruby, Sinatra, Software — Tags: — Jason Rogers @ 10:14 am

I have Capinatra (0.1.0) installed and Capistrano (2.5.3).  While trying to deploy to production I got this error:

/usr/local/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/capistrano/configuration/namespaces.rb:188:in `method_missing’: undefined local variable or method `app_class’ for #<Capistrano::Configuration::Namespaces::Namespace:0×12060d8> (NameError)

The “fix” was to set the app_class variable in my Capfile (I’m using the DSL style of Sinatra, I don’t have a base class that extends Sinatra::Base).

set :app_class, ”

May 31, 2008

MagLev

Filed under: Rails, Ruby, Smalltalk — Tags: , — Jason Rogers @ 12:15 pm

MagLev is a Ruby VM in the works by Gemstone that is targeted for a first release around September of 2008.  I am really excited about this development.  The VM will hook up to the caches and persistent store that Gemstone provides.

Avi Bryant gave a nice demo of 100 days of work on the VM.  It does simple things in the typical Gemstone distributed fashion.  Talking with some Gemstone folks afterward, I found out that in 100 days they have implemented about 20% or 30% of the Core library.  In the MagLev talk they mentioned that they are effectively (and impressively) running about 38 of the rubyspecs defined by the Rubinius team.

Great stuff.

May 29, 2008

Rails and AIR

Filed under: Ruby — Tags: — Jason Rogers @ 7:59 pm

I went to a tutorial for Powering Rails with AIR at the RailsConf2008.  There are some neat capabilities there.  One cool app they showed was their TwitterFriends which is a related-objects-graph application.  I could care less for Twitter, but I could imagine using this same thing for analyzing informal networks within a company (eg. hooking into an Exchange server and building a network based on email To: and Cc: headers).

Older Posts »

Powered by WordPress