Displaying articles with tag

Snow Leopard bites me on the a$$ again

Posted by lori, Thu Dec 03 15:02:00 UTC 2009

Twice, actually.

First, there was the, I think, Ruby 1.8.7 upgrade. Suddenly, my home-grown acts_as_my_thing plugin stops working. The classes with "acts_as_my_thing" crash and burn when loading, saying that "acts_as_my_thing" doesn't exist. Crap. Now what?

Eventually I managed to find the proper incantation. I have an abstract super class for a bunch of my models. It's called LabRecord. In the file that defines my "acts_as_my_thing", I had:
LabRecord.class_eval do include Lti::Acts::MyThing end

I think there is a class-loading chicken-and-egg problem going on, so after trying a bunch of stuff like moving around "requires" in the environment.rb file, I eventually decided that I was "doin it rong", and did this instead:
class LabRecord < ActiveRecord::Base include Lti::Acts::MyThing ...

But, that wasn't the end of my day. I did say twice, didn't I? A little while later I was diddling around with svn in my Rails project, and then BOOM. 3rdRail/Subclipse couldn't read my workspace anymore:
Unsupported working copy format svn: This client is too old to work with working copy '/Users/lori/Documents/workspaces/labrador/dev2'. You need to get a newer Subversion client, or to downgrade this working copy. See http://subversion.tigris.org/faq.html#working-copy-format-change for details. I'm too tired for this shit. Sigh. At least if you follow the link, you can download the Python script which will convert your Subversion workspace back to 1.5 (Snow Leopard has SVN 1.6), and get back to it.

0 comments | Filed Under: Ruby & Rails | Tags:

3rdRail and custom Ruby on the Mac

Posted by lori, Fri Feb 20 09:51:00 UTC 2009

I was having a lot of problems with my humongous Rails project lately, with a lot of long delays, build problems, hangs, etc. This all came to a head on Wednesday, when I couldn't do anything without having 3rdRail go and hang on me. But, one of my coworkers who also uses 3rdRail was not experiencing similar problems, so I had to come to the conclusion that the problem was... me.

I've been doing Rails development on my Mac for over 3 years now. This was pre-Leopard, so I had an installed-from-source Ruby that I used. I've been telling myself that this was just smart, because the Ruby that comes with Leopard now is subject to change, any time that Apple cares to issue a software update. I prefer to have my development tools under my own control.

Unfortunately, it seems that this custom Ruby install was the primary difference between my coworker and I, so on Wednesday afternoon I bit the bullet and ripped /usr/local out of my system (bye-bye custom MySQL, Apache, Ruby), and started the painful process of re-installing all the gems I needed using Apple's Ruby (yes, including the Oracle drivers and RMagick.... it wasn't a pleasant afternoon).

Well, now, don't I feel stupid... 3rdRail now builds/rebuilds my project in a reasonable amount of time, without all the stutters and hangs.

So, I'm posting this as an FYI. IF you run into build problems with 3rdRail, it might just be your Ruby install.

0 comments | Filed Under: | Tags:

The Rails Way with 3rdRail - Introduction

Posted by lori, Thu Apr 10 20:00:00 UTC 2008

Originally, I was going to start with Chapter 1, but then I thought, what the hey, why not start right off with some criticism. Mild criticism, but criticism none the less.

In The Rails Way - Introduction, Obie goes out of his way to talk about Enterprise Adoption, and how well suited Rails is to improving the lot of the enterprise developer. I happen to agree. Having worked on a lot of projects, in a lot of enterprises, I have a good idea how much improvement, and it is significant.

On the other hand, Obie also goes out of his way to not-so-subtly snub Windows users. Given this pro-Enterprise, boo-Windows attitude, I'm going to guess that Obie didn't attend the Enterprise Rails BOF at RailsConf 2007. Actually, since I was there, I'm pretty sure I can say that he wasn't. That particular session sticks in my mind for two reasons. First, I was the one and only woman in the room (surprise, surprise). Second, and more significantly, I was the one and only Mac user in the room. This should not come as a surprise. Enterprise developers tend not to have a choice about their development platforms. Corporate policy, in all the large corporations where I have worked/consulted (Shell, IBM, Halliburton, IHS to name a few), dictates that there is one corporate computer flavor and that flavor is Microsoft Windows. Now, some of these enterprisey guys at the BOF had branched out, with VMWare installed, and were running Linux in order to do their Rails development, but frankly, that's a hack. If you are a developer, you want maximum power out of your development platform and tools, and running in a VM is unsatisfying. IMO, if Enterprise developers are going to make any impact on the numbers of Rails developers, it's likely to be as Windows users.

And this of course is where 3rdRail comes in. Right out of the box, 3rdRail comes ready to run on Mac, Linux and ... Windows. Delivering a fully operational Ruby/Rails environment, including database, 3rdRail enables enterprise developers to get the most out of their native development platform. Since most enterprise developers will also be IDE users of some persuasion, 3rdRail should be a familiar experience, especially for Eclipse users, because 3rdRail is based on Eclipse.

0 comments | Filed Under: | Tags:

The Rails Way... with 3rdRail

Posted by lori, Mon Apr 07 21:25:00 UTC 2008

I got my copy of Obie Fernandez' The Rails Way a couple of weeks ago, but I've been so busy with work (we're down a sysadmin, a web designer, a tester, and now a developer... sigh), that I just dropped it on a shelf and almost forgot about it. Today our new sysadmin started, so I had a little breathing space (ha!). Another coworker/developer, Hal, reminded me about the book by pointing out that we'd met one of the contributors at RailsConf 2007 last year. Hi Jodi! Thanks for helping me debug our production Rails app during one of the sessions!

Anyway, I turned off the TV tonight, and pulled out The Rails Way. Since I've been using Rails for over two years in a quasi-enterprise application, I'm not expecting a tonne of grand revelations, but I'm certain that there will be a lot of tips and tricks that will improve my Rails usage, and my understanding of Rails internals.

As I started reading the introduction and chapter 1, it occurred to me that there was something else quite useful I could get out of this book. I've been nagged (in the nicest possible way) on and off for months about blogging about CodeGear's 3rdRail, which I use every day in my Rails development. Turns out, as I was reading, I kept thinking stuff like... "oh, yes, but in 3rdRail it's even easier to do..."

So, that's what I'm going to do. Chapter by chapter, as I go through the book, I'll be posting about the ways in which 3rdRail makes my life easier, as an enterprise Rails developer. Expect the first installment before the end of this week. I look forward to hearing what you think, so gimme some comments as I go!

1 comment | Filed Under: | Tags:

Problems uninstalling InterBase on the Mac?

Posted by lori, Sun Mar 23 22:13:00 UTC 2008

As a part of installing 3rdRail 1.1 on my Mac, I was attempting to clean up and get rid of the bits and pieces of the old version of 3rdRail. One of the old pieces was an install of InterBase that I never did get up and running properly. So, I navigated to the uninstall directory of InterBase, and invoke the uninstaller... and nothing happened. Tried that again a couple of times, and still nothing happened. So, I opened up Console.app, and cleared my console, and tried the uninstaller again. And magically, it complains about missing /usr/sbin/lookupd.

Sigh. lookupd disappeared when I upgraded from Tiger to Leopard back in December. I futzed around for a while, and then discovered a work-around. lookupd was replaced by dscacheutil, so I sym-linked /usr/bin/dscacheutil over to /usr/sbin/lookupd. Then I tried the InterBase uninstaller again, and it worked. When I was done, I removed the sym-link, because, although dscacheutil appeared when lookupd disappeared, they are not identical, so it's best not to pretend they are. I'm not certain why the InterBase uninstaller required lookupd to begin with, but it obviously wasn't that important.

So, if you have upgraded from Tiger to Leopard, and then been unable to uninstall InterBase, try this from Terminal:

sudo ln -s /usr/bin/dscacheutil /usr/sbin/lookupd

0 comments | Filed Under: | Tags: