# Do\_sqlite 10 windows 1.9 gem

**URL:** <https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171>\
**Category:** Ruby\
**Created:** [November 18, 2009, 11:23pm UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171 "2009-11-18T23:23:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 18, 2009, 11:23pm UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/1 "2009-11-18T23:23:57Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 19, 2009, 1:41am UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/2 "2009-11-19T01:41:18Z")

</div>

jonty wrote:

> 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.

> **[how to install sqlite3 from source on ruby mingw (1.8 or 1.9)](http://programming-gone-awry.blogspot.com/2009/05/how-to-install-sqlite3-binaries-on-ruby.html)**
>
> here they are, inspired by a question from Charles Roper 1) install wget or curl in path 2) install unzip.exe (http://gnuwin32.sourceforge.n...

-r

---

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 19, 2009, 11:46am UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/3 "2009-11-19T11:46:40Z")

</div>

On Nov 18, 7:23 pm, jonty [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

> **[GitHub - datamapper/do: DataObjects](https://github.com/datamapper/do)**
>
> DataObjects. Contribute to datamapper/do development by creating an account on GitHub.

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,

---

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 23, 2009, 12:13am UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/4 "2009-11-23T00:13:45Z")

</div>

On Nov 22, 5:59 pm, jonty [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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.

---

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 23, 2009, 1:27pm UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/5 "2009-11-23T13:27:55Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 23, 2009, 4:05pm UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/6 "2009-11-23T16:05:58Z")

</div>

On Nov 23, 9:27 am, jonty [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 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:

> <https://github.com/datamapper/do/blob/master/do_sqlite3/tasks/retrieve.rake>

Execute “rake vendor:sqlite3”, that should download the files.

---

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 22, 2009, 10:00pm UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/7 "2009-11-22T22:00:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jonty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/90db22/32.png) [@jonty](https://www.ruby-forum.com/u/jonty)\
**Post date:** [November 23, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/do-sqlite-10-windows-1-9-gem/179171/8 "2009-11-23T23:54:12Z")

</div>

Thankyou!!!

Success - the download was beautiful to watch!

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