Echographia

making things better, making better things

Saturday, May 23, 2009

Why I switched from acts_as_authenticated to Clearance, and why I didn’t need to

What happened, see, was that I finally started using my aforementioned old Rails app in earnest, and when I did, I discovered that… I couldn’t log out. I didn’t actually need to log out, but it bugged me. I dug around a little. I could log out in development mode, but not production mode. The logout method thought it was working, but when the next page loaded I was still logged in. Something to do with sessions and cookies.

Something down in the depths of the authentication system, and I thought, well, I could try to debug this ancient plugin that I didn’t write, and that has probably never been updated to newer versions of Rails… or I could try out one of those new systems I’ve been reading about. That have documentation, and support, and Rails 2.3 compatibility. How hard could it be?
(more…)

posted by erik at 4:02 pm  

Saturday, May 23, 2009

how I switched from acts_as_authenticated to Clearance

This week I updated the authentication system in an old Rails app from the pre-REST acts_as_authenticated plugin to thoughtbot’s shiny new Clearance gem. What follows isn’t a how-to (because really, who else is going to be making this switch?) but it might be useful for someone. May the Great Gazoogle guide them to these shores.
(more…)

posted by erik at 3:39 pm  

Monday, May 11, 2009

I uncorrupted a git database!

… but it was touch and go there for a while.

RubyMine is out, and I’d felt positive enough about the beta that I wanted to give it a try… but I didn’t want to do it in any existing working directory, in case it did stupid stuff with my files. So, simple enough, just clone the git repository:

[556] RubymineProjects $ git clone ~/Documents/workspace/tourette
Initialized empty Git repository in /Users/eostrom/RubymineProjects/tourette/.git/
fatal: object 3a37e547408f1f955337bade61807ef021608760 is corrupted

Fatal?!? I don’t like the sound of that.
(more…)

posted by erik at 5:45 pm  

Saturday, April 25, 2009

Rails 2.3 backtraces and emacs

This morning I exhumed an old Rails project and started cranking it forward from Rails 1.2.2 to the current version, 2.3.2. That’s about two years of Rails develpopment. This afternoon I got all the tests passing except for two (and I think they’re failing because Yahoo has changed its geocoder)… and then I found the other stash of tests. So, still working on it.

I spent some time tonight sidetracked by tools. In Emacs, thanks to Ryan Davis, I can shift-mouse-3 on pretty much any line in a stack trace and be taken to the right line in the right file. But under Rails 2.3 it doesn’t always work: (more…)

posted by erik at 9:54 pm  

Saturday, April 18, 2009

I’m at GoGaRuCo

… the Golden Gate Ruby Conference. Three talks I like so far, for different reasons: (more…)

posted by erik at 12:07 pm  

Thursday, April 9, 2009

RubyMine (IDEA for Ruby)

Quick thoughts on trying out the RubyMine IDE (based on IntelliJ IDEA) today: (more…)

posted by erik at 11:13 pm  

Sunday, February 22, 2009

compliments

After the Barefoot site launched, I got a lot of nice feedback about it, mostly from people who work for the cafe.  “Looks great!” they said, and I wasn’t quite sure how to react.  I was proud of how the site worked, but the look of the site, I thought, was entirely thanks to Conrad Altmann, the designer.

(more…)

posted by erik at 2:14 pm  

Sunday, February 8, 2009

dynamic Dock menus, HotCocoa version

Here’s a simpler version of that last post using Rich Kilmer’s HotCocoa library. I also use the approach I suggested at the end of the last post: Build a menu each time it’s requested, instead of trying to keep one at the ready.
(more…)

posted by erik at 6:48 pm  

Sunday, February 8, 2009

dynamic Dock menus in MacRuby

I’ve been wanting to write a Mac application since I got this computer a year or so ago. Still haven’t, but today I ran through a MacRuby/Cocoa tutorial, and I’m hoping to find the time to code the app I have in mind soon, before I forget whatever I just learned. More about that if it happens.

My original plan was to make the app accessible from the global menu bar, but then I learned that Apple’s Human Interface Guidelines discourage it, and you know how I love guidelines. And humans. So instead I’m going to use a Dock menu. The main advantage of both, for my purposes, is that after you take some action, control returns immediately to whatever application you were using; perfect for programs you use for a moment now and then, but don’t really spend time in.

Anyway, I thought I’d share what I learned about implementing Dock menus in MacRuby. (more…)

posted by erik at 2:48 am  

Monday, February 2, 2009

backup from dreamhost

Yesterday was the first day of February Album Writing Month, so of course I kicked things off by sinking three hours into writing a script that I could have found on the Internet somewhere. See, last week I cleaned out my GMail inbox. Since I haven’t done that, like, ever, that meant reading a lot of old and unimportant mail - like, for example, the July 2008 DreamHost newsletter, which mentioned their Entire Account Backup service, which gives you a downloadable copy of all your data for a given account. I love backups, so in the interest of being able to archive that newsletter, I kicked off a backup right then and there.
(more…)

posted by erik at 9:48 am  
« Previous PageNext Page »

Powered by WordPress