ruby-odbc unixODBC ubuntu

Hello there

I've got a fresh ubuntu box and done some magic to it to get 32 bit unixODBC to connect to a 32 bit third party driver on a 64 bit Ubuntu box. isql is working.

http://webdev.blogs.glam.ac.uk/2011/08/04/32-bit-odbc-driver-with-32-bit-unixodbc-on-a-64-bit-ubuntu-os/

I now have to test connecting to this database using ruby, in order to get my rails app to talk to it.

We're only pulling bits of data out here to populate a couple of pages with stuff, it's not the main database that runs the app.

I've installed RVM on the machine, and then install ruby 1.8.7 using rvm

which ruby /home/nonrootuser/.rvm/rubies/ruby-1.8.7-p352/bin/ruby

I've then downloaded the ruby-odbc driver from here

http://www.ch-werner.de/rubyodbc/ruby-odbc-0.99994.tar.gz

expanded it and I'm in the folder

So now, to follow the instructions

http://www.ch-werner.de/rubyodbc/README

I do

ruby -Cext extconf.rb --enable-dlopen

straight away, an error

ruby: Can't chdir to ext (fatal)

maybe it's a typo in the instructions, let's try putting a space between the -C and ext, like it is in the make commands

ruby -C ext extconf.rb --enable-dlopen ruby: Can't chdir to ext (fatal)

Same error

I thought this was going to be difficult, but I didn't imagine I'd get an error so early on.

Can anyone help me out? I'm obviously doing or have done something stupid, again :frowning:

Matt

It appears to be expecting there to be a directory called ext in the current dir, containing extconf.rb. Can you see such a folder in the unpacked files? Perhaps you are running from the wrong directory.

Colin

Colin Law wrote in post #1014948: