Closed ghazel closed 13 years ago
There is no way to detect the installed version without falling into a platform specific DL code, which we are not going.
Please force the gem installation, the binary gems are offered for convenience to users not having or wanting to have the development kit installed.
This has already been covered in previous ticket and the changes are in the repository:
http://github.com/luislavena/mysql-gem/blob/master/tasks/native.rake#L32-46
The binaries have been more of an inconvenience than a convenience. Even with the new message I would have to install the devkit and force a compilation of the gem.
If detection and bundling is not an option, please remove the 5.0 linked binaries or at least upgrade to the current version, MySQL 5.1.
Please, before asking about something, dig into the repository, the work is there, but bugs in mysql itself prevent the compilation of fat binaries for Windows.
Please patch rake-compiler to be able to generate fat-binaries on Windows if you want.
Fine. Patching rake is obviously a lot of work. Let's discard the idea of making a fat binary.
Instead, it would be more future proof to provide -no- binaries, since at some point 5.1 will be old the same way 5.0 is old today. A message will only serve to inform people later, but they will be stuck in the same situation of needing to compile by hand.
Patches are welcome.
RE: rake patching.
The project I'm talking about is rake-compiler:
http://github.com/luislavena/rake-compiler
Patches are welcome.
Please step in as responsible, try get it working and then complain.
Your comments are not contributing to the project or the time I've invested trying to maintain a project that the own author has declared dead.
I believe the patch I'm proposing is to not do something, during when you push a new gem. You push the platforms [ruby, x86-mingw32, x86-mswin32]. I would say only push the "ruby" platform. I don't see where this is done explicitly, I imagine it is something done by hand. But, if you point me at where that occurs, I'd be happy to submit a patch.
Will not push a binary gem for mswin32 on the next release, that way you can continue using One-Click Installer and Visual Studio happily without all the noise, grief and broken experience RubyInstaller is giving you.
Apologizes for all the time you wasted.
By the way, it is possible to see which MySQL version of the DLL is available to you:
http://dev.mysql.com/doc/refman/5.0/en/mysql-get-client-version.html
So, at runtime you could load the DLL dynamically LoadLibrary/GetProcAddress style, and detect an incorrect version. This would be much more helpful than a segfault.
You know: you can do it yourself too, patches are welcome.
You know? you can do it yourself too, patches are welcome.
Patch created, and pull request submitted: http://github.com/ghazel/mysql-gem/commit/cf2b5f0b9e3c1777eec9f6d451114c8647bcf527
http://github.com/oneclick/rubyinstaller/issues/issue/17
The basic issue is that gem only detects the ruby platform, not the MySQL version installed. So, especially now that MySQL 5.1 is stable version, the mysql gem causes uninformative segfaults. Instead, it would be better if the only platform available was "ruby", and compilation was required when the gem was installed (like curb, or countless other gems).