do_sqlite 10 windows 1.9 gem

J

jonty

I understand that this is not yet compiled for ruby 1.9 on windows

I would love to have a go at compiling it as I need it to access my
sqlite db from ruby 1.9 - it appears to be the last obstacle

I have googled far and wide but can't find the source code - can anyone
point me in the right direction?
 
R

Roger Pack

jonty said:
I understand that this is not yet compiled for ruby 1.9 on windows

I would love to have a go at compiling it as I need it to access my
sqlite db from ruby 1.9 - it appears to be the last obstacle

I have googled far and wide but can't find the source code - can anyone
point me in the right direction?

The source is probably somewhere in
gem fetch do_sqlite
gem unpack *.gem

Take a glance at the sqlite3-ruby gem--I think it is setup to
automagically download the sqlite headers it needs and compile using
them. That might help.
http://programming-gone-awry.blogspot.com/2009/05/how-to-install-sqlite3-binaries-on-ruby.html

-r
 
L

Luis Lavena

I understand that this is not yet compiled for ruby 1.9 on windows

No, there wasn't a 'fat-binary' that includes both 1.8 and 1.9
versions of the compiled extension.
I would love to have a go at compiling it as I need it to access my
sqlite db from ruby 1.9 - it appears to be the last obstacle

If you have the right tools, you can compile the 'ruby' version
directly.
I have googled far and wide but can't find the source code - can anyone
point me in the right direction?

DO stands for DataObjects.

http://github.com/datamapper/do

git clone, and "rake native gem" will generate a binary gem for 1.9

Only use it for testing as 1.9 on Windows has not been extensively
tested by DataMapper developers (at least in relation to the cross
compilation process).

Cheers,
 
J

jonty

Thanks Luis!

I have had to spend some time sorting git as its config file had
duplicates - a bug?

But I tried your suggestion to use rake on the source to generate a
native gem, great stuff! But it didn't work, because I didn't have
rake-compiler, now I have rake-compiler but it complains that it has not
been configured properly! What does this mean? How do I configure it?
 
L

Luis Lavena

Thanks Luis!

I have had to spend some time sorting git as its config file had
duplicates - a bug?

Dunno what you mean.
But I tried your suggestion to use rake on the source to generate a
native gem, great stuff! But it didn't work, because I didn't have
rake-compiler, now I have rake-compiler but it complains that it has not
been configured properly! What does this mean? How do I configure it?

It warns you, but that's all.

The legend says "rake-compiler must be configured first to enable
cross-compilation"

cross-compilation is compile code in Linux or OSX targeting Windows.

That is a functionality to allow developers release Windows gems
without the need of a Windows machine. You can safely ignore it.

Issuing a "rake native gem" should generate you the proper gem inside
"pkg" folder.

Be warned that you need "unzip" and "wget" to be able to download the
required files to build the binaries.

Download, extract and place them somewhere in the PATH.
 
J

jonty

Thanks again Luis

Getting closer now... I get the message 'checking for sqlite3.h...no',
from what you say it should download them, but it doesn't. I have wget
and unzip in my Path as you prompted. I couldn't see in the rake files
etc where the code to get the files is. Is this a bug do you think or am
I still missing something?
 
L

Luis Lavena

Thanks again Luis

Getting closer now... I get the message 'checking for sqlite3.h...no',
from what you say it should download them, but it doesn't. I have wget
and unzip in my Path as you prompted. I couldn't see in the rake files
etc where the code to get the files is. Is this a bug do you think or am
I still missing something?

Check tasks directory:

http://github.com/datamapper/do/blob/master/do_sqlite3/tasks/retrieve.rake

Execute "rake vendor:sqlite3", that should download the files.
 
J

jonty

Thankyou!!!

Success - the download was beautiful to watch!

I now have a shiny new gem - I will feedback once I have tested it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,898
Members
47,439
Latest member
shasuze

Latest Threads

Top