-
Notifications
You must be signed in to change notification settings - Fork 550
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Windows support #8
Comments
Would love to, I've never used rake-compiler tho. And I don't really have a dev env setup in my Windows VM. Once I get the async stuff in, and the AR driver done I might take a look at supporting Windows. |
+1 one for Windows support. I develop there and deploy to Unix. |
I gave this a try in my windows7 VM I setup, and it appears to nearly compile fine only I can't figure out how to tell it where to find my libmysql.dll file - even if I point it right at the damn thing :P May need some help from another windows/ruby guru... |
+1. Getting the following error now: c:/Ruby19/bin/ruby.exe extconf.rb |
+1 for windows support. |
+1 for windows support |
Will try to push a win32 gem with 0.2.0 - hang tight :) |
Thanks for all your efforts Brian. Much appreciated. |
just pushed out 0.2.0 - people were chomping at the bit for the fixes that were in it so I decided to push it and will work on 0.2.1 soon here after with win32 support |
thanks |
+1 Any update on the progress for windows support? I see rake-compiler is being used but I can't get |
|
still not work on windows |
workin on it guys :) |
thanks....we'll wait... |
+1 for windows support, can't wait :) |
+1. Would be really appreciated. |
I also try to install mysql2 on the MinGW with "--with-mysql-include=C:/mariadb-5.1.49-win32/include --with-mysql-lib=C:/mariadb-5.1.49-win32/lib/opt" options. But does not go successfully. C:/mariadb-5.1.49-win32/include/typelib.h:32:13: error: expected '=', ',', ';', 'asm' or 'attribute' before 'find_type_or_exit' So I hope MinGW support too. |
One more request for mysql2 on windows. I can't move up to rails3.0.0 until it works because without it rails doesn't work. Thanks for your work. |
@girlgeek - just use the old mysql gem, for rails3 until there is a mysql2 win gem. |
I managed to get this to build on windows using the most recent version from github. Only problem is that it is throwing "invalid date" errors on records with datetime fields: ArgumentError: invalid date Getting closer though |
Anything special about how you got it to build? |
This is how I built it:
Gem builds fine and runs. Some records return data correctly but I get a lot of 'invalid date' errors for whatever reason. |
Interesting that I can't seem to even get that far. What version of Windows and DevKit (and/or what compiler) are you using? |
Just the latest rubyinstaller/devkit (using 1.9.2 but not sure that it would make a difference) I'm running on Windows 7 x64, but again, not sure why that would make a difference. Seems like it works if you have the right mysql libs and are building locally. What error did you run into? |
I have now backed rails to 2.3.5 so I can no longer replicate, but from my old records:
Those are the errors that I ran into. |
Hey guys, can you please read the comments? There has been no gem release with the fix for this, thus any continuous report about mysql2 not been able to install with Rails 3 is pointless. Please report feedback with patches on how to solve the issue (see aaronchi comments) and avoid repeat endless things about that you're unable to install it. |
@luislavena - agreed. It would be good if some more people could validate the install process that I used. Apparently this can be installed and just needs to be debugged on windows. |
I apologize. I thought that I was responding to a direct question and helping. I have no interest in endless pointless reports. |
Hey everyone, I've FINALLY narrowed down what's going on, will post an update soon and hopefully get 0.2.4 released with the first win32 binary :) |
Great News Brian!! Hopefully you can solve the last bug rater easily! We all appreciate your hard work. Cheers |
The date parsing bug is the other one, will hopefully have that one fixed before 0.2.5 as well. I may need to push 0.2.5 soon though, and follow up with 0.2.6 soon after. |
Just pushed 0.2.5, working on win32 builds of it now - no guarantees though (may have to wait until 0.2.6) |
Thanks so much for all your efforts Brian. I will try it out right away. |
FYI - I just had a user say they were able to install the gem (even 0.2.4) by doing: gem install mysql2 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL Server 5.1\lib\opt" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.1\include"' Obviously the paths to your mysql install may differ, but hopefully that should help! |
For the record: Ruby 1.9.2 + DevKit, simple queries seems to work. |
The direct gem install procedure with options did not work for me. I had to clone the repository and build the gem that way, as per the steps from luislavena |
Pushed binary gems with 0.2.6 (the binary gems for 0.2.5 are broken and will be yanked) - Thanks for all the help guys! :) :) :) |
Whoah! "gem install mysql2" worked great! |
theres an existing ticket for the date bug here: #71 - I'm doing my best to track it down, but I may need to remote connect to someones machine that can reproduce it and debug it there |
oh cool! hopefully it's fixed for the users in #71 as well then :) |
I have been hitting it hard and no ruby crashes! I am a very happy man. |
24 hours later and everything is working great! Good work Brian. |
Thanks man, bloody good work. :) |
<3 |
I just tried
on Cygwin (Windows XP) with MySQL Server 5.1 installed, but I'm getting: Does anybody know how to fix it? |
I have Ruby installed through Cygwin. MySQL is installed natively in Windows. Installing DevKit and reinstalling MySQL with no directory spaces made no difference I'm afraid. |
@abletony84 You can't mix cygwin with native MySQL. If you use cygwin you need a cygwin mysql. |
Helios-1: Output is the same. Yup, gcc is installed, make too. luislavena: I've been able to with the old mysql though. |
Anybody know? |
I've been looking forward to getting this gem on windows for a while now but while it installs, my app hangs when it goes to load a page after I start it with either webrick or mongrel. Just wanted to report that and see if anyone else was having the same problem. |
im facing the problem while installing the gem mysql2 on windows system. following is the error.
checking for main() in -llibmysql... no Provided configuration options: Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/mysql-2.8 please help me if possible |
Okay, thats "mysql" "2.8.1". But, this product is "mysql2" and version is "2.3.6". |
Also, mysql gem version 2.8.1 is provided in binary form for Windows: |
thank u.. prblem solved |
This might help anyone who is still trying to get this gem to work on Windows 7 64bit, MySQL Server 5.5, and Rails 3.0.7/3.0.8: http://paul-wong-jr.blogspot.com/2011/06/getting-mysql2-gem-to-work-with-ruby-on.html |
You can completely avoid the 32bits installation if you already had the 64bits just by downloading MySQL Connector/C, extracting it somewhere and pointing to that directory during the gem install process, as described in the wiki page. |
I have tried every option, but now I get error as below; make: gcc: Command not found |
I have already execute
|
It would be nice to have running it under Windows. I think rake-compiler would be a good helpful tool in this case :)
http://github.com/luislavena/rake-compiler
The text was updated successfully, but these errors were encountered: