Charles Roper
2009-May-28 18:03 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
What''s the current best way of installing the sqlite3-ruby gem under 1.8.6 mingw32? CHarles
deepj
2009-May-28 18:27 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
gem install sqlite3-ruby -- --with-sqlite3-dir=c:/your/path/to/sqlite I suppose you have any dev environment something like devkit. Dne 28.5.2009 20:03, Charles Roper napsal(a):> What''s the current best way of installing the sqlite3-ruby gem under > 1.8.6 mingw32? > > CHarles > _______________________________________________ > Rubyinstaller-devel mailing list > Rubyinstaller-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyinstaller-devel >
Roger Pack
2009-May-28 18:27 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
I saw this link: http://www.mikehodgson.com/gems/ mentioned in the mailing list, but I''m not sure exactly *how* he generated those gems. Cheers! -=r On Thu, May 28, 2009 at 12:03 PM, Charles Roper <reachme at charlesroper.co.uk> wrote:> What''s the current best way of installing the sqlite3-ruby gem under 1.8.6 > mingw32?
Charles Roper
2009-May-28 18:39 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
Roger Pack wrote:> I saw this link: > http://www.mikehodgson.com/gems/ > mentioned in the mailing list, but I''m not sure exactly *how* he > generated those gems.Yeah, I saw that too (thanks Mike!), but I wasn''t sure if this was the preferred way of doing it, or even if there *is* a preferred way of doing it. Charles
Luis Lavena
2009-May-28 18:39 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
On Thu, May 28, 2009 at 3:03 PM, Charles Roper <reachme at charlesroper.co.uk> wrote:> What''s the current best way of installing the sqlite3-ruby gem under 1.8.6 > mingw32? >Right now you can build it using my sqlite3-ruby fork at GitHub: http://github.com/luislavena/sqlite3-ruby I''m working on "fat binaries" to allow both 1.8 and 1.9 work, but as usual, daily job is in the middle :-P Cheers, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
deepj
2009-May-28 18:40 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
I''ve forgotten to say you must download this sqlite''s files and create lib and include folder http://www.sqlite.org/sqlitedll-3_6_14_2.zip sqlite3.def sqlite3.dll -> lib folder http://www.sqlite.org/sqlite-source-3_6_14_2.zip sqlite3.h -> include folder go to lib folder and run dlltool.exe --dllname sqlite3.dll --def sqlite3.def --output-lib sqlite3.a dlltool is part of devkit You can use gem install now: gem install sqlite3-ruby -- --with-sqlite3-dir=c:/your/path/to/sqlite
Luis Lavena
2009-May-28 18:54 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
On Thu, May 28, 2009 at 3:40 PM, deepj <deepjungle.maca at gmail.com> wrote:> I''ve forgotten to say you must download this sqlite''s files and create lib > and include folder > > http://www.sqlite.org/sqlitedll-3_6_14_2.zip > > sqlite3.def > sqlite3.dll > -> lib folder > > http://www.sqlite.org/sqlite-source-3_6_14_2.zip > > sqlite3.h > -> include folder > > go to lib folder and run > dlltool.exe --dllname sqlite3.dll --def sqlite3.def --output-lib sqlite3.a > > dlltool is part of devkit > > > You can use gem install now: > gem install sqlite3-ruby -- --with-sqlite3-dir=c:/your/path/to/sqliteThat''s why my GitHub fork of Jamis sqlite3-ruby already does all that for you. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Charles Roper
2009-May-28 19:05 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
Luis Lavena wrote:> Right now you can build it using my sqlite3-ruby fork at GitHub: > > http://github.com/luislavena/sqlite3-rubySorry, please excuse my ignorance, when you say build it, how do I do that? I have the devkit installed and working, but don''t know how to build a gem manually... I have to run a rake task presumably? Charles
Luis Lavena
2009-May-28 19:17 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
On Thu, May 28, 2009 at 4:05 PM, Charles Roper <reachme at charlesroper.co.uk> wrote:> Luis Lavena wrote: >> >> Right now you can build it using my sqlite3-ruby fork at GitHub: >> >> http://github.com/luislavena/sqlite3-ruby > > Sorry, please excuse my ignorance, when you say build it, how do I do that? > I have the devkit installed and working, but don''t know how to build a gem > manually... I have to run a rake task presumably? >No worries: You need Git and the compiler around. git clone the URL. cd into the fresh cloned repository. rake native gem gem install --local pkg/sqlite3-ruby-1.2.4-x86-mingw32.gem (or something like that, don''t remember the version number) -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry
Roger Pack
2009-May-28 19:29 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
>> You can use gem install now: >> gem install sqlite3-ruby -- --with-sqlite3-dir=c:/your/path/to/sqlite > > That''s why my GitHub fork of Jamis sqlite3-ruby already does all that for you.oh wow that is indeed nice.
Charles Roper
2009-May-29 20:14 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
Luis Lavena wrote:> rake native gemHmm, when I do this step I get this: D:\@ruby\sqlite3-ruby>rake native gem (in D:/@ruby/sqlite3-ruby) rake-compiler must be configured first to enable cross-compilation rake-compiler must be configured first to enable cross-compilation mkdir -p tmp/i386-mingw32/sqlite3_api cd tmp/i386-mingw32/sqlite3_api c:/ruby/bin/ruby.exe -I. D:/@ruby/sqlite3-ruby/ext/sqlite3_api/extconf.rb --with-sqlite3-dir=D:/@ruby/sqlite3-ruby/vendor/sqlite3 checking for fdatasync() in -lrt... no checking for sqlite3.h... no *** D:/@ruby/sqlite3-ruby/ext/sqlite3_api/extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=D:/@ruby/sqlite3-ruby/ext/sqlite3_api --curdir --ruby=c:/ruby/bin/ruby --with-sqlite3-dir --with-sqlite3-include --without-sqlite3-include=${sqlite3-dir}/include --with-sqlite3-lib --without-sqlite3-lib=${sqlite3-dir}/lib --with-rtlib --without-rtlib rake aborted! Command failed with status (1): [c:/ruby/bin/ruby.exe -I. D:/@ruby/sqlite3-...] (See full trace by running task with --trace)
Roger Pack
2009-May-29 23:03 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
appears to be 1) install wget or curl 2) install unzip.exe (cygwin unzip package, put cygwin\bin in your path) 3) install rake compiler 4) rake vendor:sqlite3 5) rake native gem 6) gem install pkg/xxx.gem suh weet sqlite3 on 1.9 even. GL! -=r On Fri, May 29, 2009 at 2:14 PM, Charles Roper <reachme at charlesroper.co.uk> wrote:> Luis Lavena wrote: > >> rake native gem > > Hmm, when I do this step I get this: > > D:\@ruby\sqlite3-ruby>rake native gem > (in D:/@ruby/sqlite3-ruby) > rake-compiler must be configured first to enable cross-compilation > rake-compiler must be configured first to enable cross-compilation > mkdir -p tmp/i386-mingw32/sqlite3_api > cd tmp/i386-mingw32/sqlite3_api > c:/ruby/bin/ruby.exe -I. D:/@ruby/sqlite3-ruby/ext/sqlite3_api/extconf.rb > --with-sqlite3-dir=D:/@ruby/sqlite3-ruby/vendor/sqlite3 > checking for fdatasync() in -lrt... no > checking for sqlite3.h... no > *** D:/@ruby/sqlite3-ruby/ext/sqlite3_api/extconf.rb failed *** > Could not create Makefile due to some reason, probably lack of > necessary libraries and/or headers. ?Check the mkmf.log file for more > details. ?You may need configuration options. > > Provided configuration options: > ? ? ? ?--with-opt-dir > ? ? ? ?--without-opt-dir > ? ? ? ?--with-opt-include > ? ? ? ?--without-opt-include=${opt-dir}/include > ? ? ? ?--with-opt-lib > ? ? ? ?--without-opt-lib=${opt-dir}/lib > ? ? ? ?--with-make-prog > ? ? ? ?--without-make-prog > ? ? ? ?--srcdir=D:/@ruby/sqlite3-ruby/ext/sqlite3_api > ? ? ? ?--curdir > ? ? ? ?--ruby=c:/ruby/bin/ruby > ? ? ? ?--with-sqlite3-dir > ? ? ? ?--with-sqlite3-include > ? ? ? ?--without-sqlite3-include=${sqlite3-dir}/include > ? ? ? ?--with-sqlite3-lib > ? ? ? ?--without-sqlite3-lib=${sqlite3-dir}/lib > ? ? ? ?--with-rtlib > ? ? ? ?--without-rtlib > rake aborted! > Command failed with status (1): [c:/ruby/bin/ruby.exe -I. > D:/@ruby/sqlite3-...] > > (See full trace by running task with --trace) > > _______________________________________________ > Rubyinstaller-devel mailing list > Rubyinstaller-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubyinstaller-devel >
Charles Roper
2009-May-30 12:37 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
Success! Thanks for the advice Roger. Roger Pack wrote:> 1) install wget or curlI already had curl - it''s part of the git distrubution> 2) install unzip.exe (cygwin unzip package, put cygwin\bin in your path)I didn''t like the idea of including cygwin in my path (I think Luis strongly discourages it too), so I downloaded it from here: http://gnuwin32.sourceforge.net/packages/unzip.htm> 3) install rake compiler > 4) rake vendor:sqlite3 > 5) rake native gemI was having serious troubles running the rake commands. Turns out I needed to add the bin folder in GCC in the devkit to my path. I hadn''t already done this because I assumed that installing the devkit (and the .bat files that come with it) in the Ruby folder would do this for me. Obviously not.> 6) gem install pkg/xxx.gem > > suh weet sqlite3 on 1.9 even.Truly. Thanks Roger, and especially thanks to Luis for providing such sexy tools. ;-) Charles
Charles Roper
2009-May-30 13:11 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
Charles Roper wrote: > I was having serious troubles running the rake commands. Turns out I> needed to add the bin folder in GCC in the devkit to my path. I hadn''t > already done this because I assumed that installing the devkit (and the > .bat files that come with it) in the Ruby folder would do this for me. > Obviously not.Actually, looking at the file in C:\ruby\devkit\bin\gcc.bat I see that it should configure the paths on-the-fly, but clearly for me that wasn''t working. Seems that Rake::ExtensionCompiler.mingw_gcc_executable is returning false. I had a quick look at that method and to my inexperienced eye, it looks like it is actively looking for *mingw*gcc{,.*} (i.e., mingw32-gcc.exe) in the path, which it obviously can''t find. I tried adding a mingw32-gcc.bat file (similar to the gcc file) to c:\ruby\bin but this made the dlltool method fail (it ends up trying to look for dlltool.exe in c:\ruby\bin). Is there a way of specifying the location of mingw_gcc_executable without having to add it to my path? Or shall I just permanently add it to my path? Charles
Roger Pack
2009-May-30 13:26 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
>> needed to add the bin folder in GCC in the devkit to my path. I hadn''t >> already done this because I assumed that installing the devkit (and the .bat >> files that come with it) in the Ruby folder would do this for me. Obviously >> not.oops forgot that step :)> Actually, looking at the file in C:\ruby\devkit\bin\gcc.bat I see that it > should configure the paths on-the-fly, but clearly for me that wasn''t > working. > > Seems that Rake::ExtensionCompiler.mingw_gcc_executable is returning false. > I had a quick look at that method and to my inexperienced eye, it looks like > it is actively looking for *mingw*gcc{,.*} (i.e., mingw32-gcc.exe) in the > path, which it obviously can''t find. > > I tried adding a mingw32-gcc.bat file (similar to the gcc file) to > c:\ruby\bin but this made the dlltool method fail (it ends up trying to look > for dlltool.exe in c:\ruby\bin). > > Is there a way of specifying the location of mingw_gcc_executable without > having to add it to my path? Or shall I just permanently add it to my path?Yeah appears that currently rake compiler doesn''t "like" the devkit''s batch file way of handling compilation...ah well. -=r
Luis Lavena
2009-May-30 20:48 UTC
[Rubyinstaller-devel] Best way of installing sqlite3-ruby gem?
On Sat, May 30, 2009 at 10:11 AM, Charles Roper <reachme at charlesroper.co.uk> wrote:> Charles Roper wrote: > ?> I was having serious troubles running the rake commands. Turns out I >> >> needed to add the bin folder in GCC in the devkit to my path. I hadn''t >> already done this because I assumed that installing the devkit (and the .bat >> files that come with it) in the Ruby folder would do this for me. Obviously >> not. > > Actually, looking at the file in C:\ruby\devkit\bin\gcc.bat I see that it > should configure the paths on-the-fly, but clearly for me that wasn''t > working. > > Seems that Rake::ExtensionCompiler.mingw_gcc_executable is returning false. > I had a quick look at that method and to my inexperienced eye, it looks like > it is actively looking for *mingw*gcc{,.*} (i.e., mingw32-gcc.exe) in the > path, which it obviously can''t find. > > I tried adding a mingw32-gcc.bat file (similar to the gcc file) to > c:\ruby\bin but this made the dlltool method fail (it ends up trying to look > for dlltool.exe in c:\ruby\bin). > > Is there a way of specifying the location of mingw_gcc_executable without > having to add it to my path? Or shall I just permanently add it to my path? >The batch files bundled in devkit make RubyGems install procedure work, but will fail while building sqlite3-ruby or mysql-gem from scratch. mingw32-gcc.bat can be similar to gcc.bat and mingw32-dlltool.bat can be placed there too. To workaround all those batch files, I have one that alters the path only when requested called "add-mingw.bat" which add gcc\bin and msys\bin to the path. Working right now on solve fat binaries for binary gems, after that going to fix sqlite3-ruby and do a release and announcement. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry