Tuesday, October 31, 2006

Ruby on Rails with Oracle Express

My company uses Oracle.  I'm the only guy that uses Rails, building my prototypes first "the right way" and then whipping something up in .Net once I have the idea what I want.  Recently I put Oracle Express (10g) onto my machine, which works with our regular environment, but I needed it to work with Rails as well.

I had a little difficulty.  If I just set the database to "XE", the default, which carries with it in the tnsnames.ora file enough information to figure out what machine it is running on, I would get an error ORA-12560: TNS protocol adapter error.

However, if I added "host: localhost" explicitly, the error would change to ORA-12514: TNS listener does not currently know of service requested in connect descriptor.

It's worth noting that I can connect Ruby/Rails to the regular Oracle instance from this machine, so I know that whatever issue I'm having, it's an Express-specific one.

Turns out to be something I would not have expected.  Instead of specifying database and assuming that host will be calculable from it, specify the host in a way that you also specify what database you want.  Try   "host: localhost/xe".  Leave the database line out.  Works for me!

 

Technorati tags: , , ,

Wednesday, October 11, 2006

My Dell Inspiron 5150 : Back from the Dead?

About 3+ years ago my primary machine was a Dell Inspiron 5150.  As my previous employer constantly reminded me, this was "my" machine and thus they would not buy me toys for it :).

About a year ago it started having issues with staying powered on.  I would leave it plugged in all night only to wake up the next morning to a dead battery.  I discovered that I needed to wiggle the cord a bit sometimes to get it to stay charging.  I figured that was just because I was beating on the power cord a bit too much shoving it into my travel bag.  Eventually it became a bad problem as I realized the wiggly connection was at the motherboard, and pretty soon no amount of wiggling would fix it.  Power ran down and I could no longer boot, nor could I keep a direct AC current going long enough to meaningfully use the machine.

Long out of warranty with Dell, I contacted some external sources to try fixing it.  At least one said simply that while he knew of the problem, it wasn't worth his time to fix it because it's too much of a pain to take the thing apart. 

So there the machine sits in my office, collecting dust.  I hate to get rid of it, since being a Linux geek I realize the potential power of any old laptop for kids' use, or email client, and so on.

Imagine my surprise yesterday when I get one of those "blah blah class action lawsuit to which you may be entitled...." form letters in the mail.  For owners of the Dell 5150 Inspiron.  With power problems.  Really?  Nice.  Seems I'm not the only one with the problem.  If I'm reading it right, then all owners of this particular model (i.e. no matter when I bought it) who have certain qualifying problems are entitled to get their machines repaired for free.  I'm not guaranteed that my particular problem is one of the qualifying ones, but I definitely see the words "power cord" and "motherboard" in there, so you know I'm giving it a shot.   How cool would that be?   I'm excited.  Already got a spot picked out in the family room for it where the wife can check her email and the kids can play games.

Cross fingers!

 

Technorati tags: , , , ,