I have been able to succeed in compiling the do_mysql gem on Windows
without Cygwin
but there is one spec is failing.

expected: "2008-11-17T10:04:33+05:30", got:
"2008-11-17T10:04:33+00:00".

if I could get some insight into fixing this issue then a DataMapper
will have binary MySQL driver
which will work without cygwin and with ease.

if this succeed i would help in bringing out binary Postgres driver.

On Nov 13, 3:34 pm, Ajay CB <[EMAIL PROTECTED]> wrote:
> Here are the rough steps I took to get it working with cygwin. Without
> cygwin I didt see much light.
>
> Steps for cygwin.
>
> -> Setup ruby and gems on cygwin. (Make sure RUBYOPTS='' before
> installing gem) and you have no conflicting version of ruby or gem
> thru cygwin.
> -> get all the standard gems you would need - rake, hoe, etc (gem
> install rails and u will have most of it. Rest I got it on demand)
> -> gem install datamapper -v 0.9.5
> -> gem install data_objects -v 0.9.5
> -> gem uninstall data_objects -v 0.9.6
> edit /usr/lib/ruby/gems/1.8/gems/datamapper-0.9.5/lib/data_mapper.rb
> (and change     gem lib, "0.9.4" => gem lib, "0.9.5")
> -> gem install json_pure
> -> Install Mysql(as a service on windows) -> Go to admin panel and
> change the host from localhost to 127.0.0.1 (This will make it use TCP/
> IP instead of file sockets). Restart Mysql server.
>
> -> download the mysql source (get the tar ball) and compile it in
> cygwin.(you really only need the client lib, but just do a ./
> configure, followed by make install - that worked for me)
>
> -> install do_mysql gem from the 'dorb' source (at this point this
> thread helped me..http://groups.google.com/group/datamapper/
> browse_thread/thread/50e67dcf1dd40012/509bc74b0b9f0ec3?lnk=gst&q=do
> +windows#509bc74b0b9f0ec3)
> -----> use github and download the source 
> fromhttp://github.com/luislavena/do/tree/master
> or if u have git installed on windows git clone it to a directory.
> --> cd do_mysql
> --> rake install
> (Say thanks to Luis Lavena here)
>
> -> you will/may get a compile error (something like do_mysql_ext.c:
> 216: error: structure has no member named `tm_gmtoff' )
> Useful thread  
> :http://groups.google.com/group/datamapper/browse_thread/thread/72ce25...
> In short.
> cd ext
> edit do_mysql_ext.c and apply the patches you find 
> @http://wm.lighthouseapp.com/projects/4819/tickets/344
> you can use patch - I did it by hand since there were only 4 changes.
>
> then rake install it again - keep your fingers crossed!
> it should go through fine and do_mysql v 0.9.5 should get installed
>
> at this point you should be able to use datamapper with
> mysql..provided you configure it right
> host: 127.0.0.1 (not localhost)  - this forces TCP/IP
> and remove socket: from the config as we are hitting MySQL via TCP/IP
>
> DISCLAIMER : I am new to ruby and to datamapper. All this was done to
> get a windows dev environment setup and not for production. on linux
> its way easier than this. So do not plan to go live with this
> approach.
>
> Hope this info helps somebody as I spend 2 full days racking my puny
> brain to get this working on windows.
>
> Enjoy DM.
>
> Cheers!
> -Ajay
>
> On Nov 10, 10:41 pm, José Valim <[EMAIL PROTECTED]> wrote:
>
> > I couldn't install do_mysql on Windows.
> > Any help?
>
> > >gem install do_mysql
>
> > Building native extensions.  This could take a while...
> > ERROR:  Error installing do_mysql:
> >         ERROR: Failed to build gem native extension.
>
> > c:/ruby/bin/ruby.exe extconf.rb install do_mysql
> > checking for mysql.h... no
> > checking for main() in libmysql.lib... no
> > checking for mysql_query() in mysql.h... no
> > *** 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
> >         --srcdir=.
> >         --curdir
> >         --ruby=c:/ruby/bin/ruby
> >         --with-mysql-dir
> >         --without-mysql-dir
> >         --with-mysql-include
> >         --without-mysql-include=${mysql-dir}/include
> >         --with-mysql-lib
> >         --without-mysql-lib=${mysql-dir}/lib
> >         --with-libmysqllib
> >         --without-libmysqllib
>
> > Gem files will remain installed in c:/ruby/lib/ruby/gems/1.8/gems/
> > do_mysql-0.9.6 for inspection.
> > Results logged to c:/ruby/lib/ruby/gems/1.8/gems/do_mysql-0.9.6/ext/
> > gem_make.out
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to