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!