-
Notifications
You must be signed in to change notification settings - Fork 188
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
"Cannot load such file -- tiny_tds/tiny_tds" (version 1.1.0, version 1.0.0 is OK) #330
Comments
No. We push pre-compiled native gems for the Windows platform that have statically linked FreeTDS and friends to Rubygems. This is what we use Miniportile/Docker to accomplish. I suspect there is a gem install command that can ignore the platform detection but I would have to Google for it. Not sure why you are having the require issue? |
I notice that your tsql -C command says it's using freetds 1.00.9, which is interesting since tiny_tds 1.1.0 is compiled against its own patched version of 1.00.21. Is there a chance you've installed your own copy of FreeTDS libraries are taking precidence over tiny_tds's version? If you'd like a better picture of what's being loaded (or failing to load), you can install the Microsoft Sysinternals Suite and use procmon filtered only for load events in your freetds and ruby directories. This will show you where it's looking for DLLs, what it's loading, and what it can't find. If it's loading openssl, libiconv, or freetds libraries external to the tiny_tds gem there's a chance they might be causing the problem. It may also be a good idea to check the actual LoadError exception being thrown and caught in your modified gem to see what its exception actually says. |
I had installed freetds and put it on the path, i deleted it and removed the path reference, that didn't help though (just confirmed, uninstalled v 1.0.0, reinstalled v 1.1.0, get the same issue) |
Darned, there goes the easy solution. The next step is to actually debug the load error and try and find the source. Unfortunately I do not have any Windows 7 environments (enterprise or otherwise) to help test. Please do investigate and let us know what you find! |
Yes will do! :) |
+1 for the same issue. Upgraded from 1.0.5 to 1.1.0.
|
@Insood What is your platform/os? |
Hi! Sorry - got distracted. It's Microsoft Windows 7 Professional (6.1.7601 Service Pack 1 Build 7601). Ruby is ruby 2.1.5p273 (2014-11-13 revision 48405) [i386-mingw32]. Everything was initially installed with rails installer some time ago. Downgrading to 1.0.5 "fixes" things. I have freeTDS installed in C:/FreeTDS
However, it's not in the global PATH. Doing tsql -C gets me this:
|
@Insood Two things:
|
It looks like it may be an issue with LIBSYBDB-5.DLL. I've opened up A: C:\RailsInstaller\Ruby2.3.0\lib\ruby\gems\2.3.0\gems\tiny_tds-1.1.0-x86-mingw32\ports\i686-w64-mingw32\bin\libsybdb-5.dll And there's an error opening up (A) because it can't find "LIBGCC_S_SJLJ-1.DLL" It does not look like LIBGCC_S_SJLJ-1.DLL is used by (B) |
Thank you very much for the report. I'll take a peek shortly! |
@Insood Do you happen to have the DevKit installed for your version of the RubyInstaller? I'm working off a theory that it works on all my test machines because the library is provided by the devkit but not the base installer... Can you please confirm the following:
If so I think I have a reproduction case and can begin debugging. :) |
@Insood if you get a moment could you please confirm or deny the above assumptions? It could save me hours and hours of testing if you could. :) |
Hi @coderjoe , Sorry for late response. I'm running the following: ruby: rails: Windows: RailsInstaller comes with devkit (C:\RailsInstaller\DevKit). There's a C:\RailsInstaller\DevKit\mingw\bin\libgcc_s_sjlj-1.dll My PATH has the following: PATH=C:\RailsInstaller\Git\cmd;C:\RailsInstaller\Ruby2.3.0\bin;C:\RailsInstaller |
@Insood Did you make sure to uninstall that unsupported |
@Insood interesting. That helps a lot. I'll try reproducing within RailsInstaller instead of just RubyInstaller. I'm surprised it's failing with DevKit installed since that solved it using RubyInstaller. You've given me more than enough information to debug the problem and I think I can set up a good reproduction case. Thank you very much! I'll set aside some hack-time this weekend to see what I can do to resolve the error. :) |
@Insood I can't seem to reproduce your problem with RailsInstaller but I have managed to reproduce it with RubyInstaller-x32 on x64 without devkit. While I'm working on this I noticed something, your Ruby path says it's version 2.0.0 but your PATH seems to say you have 2.3.0. Do you have more than one version of RubyInstaller version installed as well? |
@metaskills, FreeTDS has been uninstalled (somehow I had two installations - one in C:/ and one in C:/Program Files) - still nothing. @coderjoe, that was the output from opening up the "Command Prompt with Ruby and Rails".bat file which has a target of: C:\Windows\System32\cmd.exe /E:ON /K C:\RailsInstaller\Ruby2.3.0\setup_environment.bat C:\RailsInstaller I only have 2.3.0 installed. I had a previous version (2.1.0) at one point, but did a clean uninstall/reinstall. I typically just use the regular command prompt. That .bat file looks like this:
However, I don't have 1.9.1 installed and I'm not sure what the heck this .bat file is doing. I'm going to hop on another computer and see what installing 1.1.0 on there does. |
@Insood thank you for your prompt follow-up! Now that I can reproduce the specific library load error you showed in your screenshot above I'll move forward with debugging. If you find anything else interesting please continue to let us know. :) |
@Insood can you do me a favor and test one of these gemfiles in place of the tiny_tds gem hosted on rubygems based on your platform? https://drive.google.com/open?id=0BxSqGuxD46a2ZjlkTzFleXFmUVkx Please try the x64 build in your environment and get back to me. I'm running into something rather odd and I want to confirm you still have problems. @metaskills The oddity I'm running into is that the gem files I build locally don't have the errant requirement listed in the screenshots above, but the gems hosted on rubygems.org do. They should both be built from the exact same source so I'm very confused as to what could possibly be causing the difference. |
@coderjoe Do you want to try and build and push new v1.1.1 gems to rubygems? I can add you to the rubygems if you give me your email for there. |
@metaskills Not quite ready to release anything yet. I haven't proven I can fix anything, and I've no interest in pushing a patch that doesn't do anything. ;) I'll e-mail you from my e-mail address anyway. If we get to the point that we have confirmation that they work I can push a patch with gems built on my machine. |
I have the same issue. Now I have uninstall the previous version of tiny_tds (x86) and installed the one suggested by @coderjoe (x64) allocated on google drive. The message is now: |
FWIW - I ran into a similar issue while working on a project in development. I ran bundle update and started getting Tiny TDs errors. I changed to gemfile to read I am seeing warnings after running bundle install of
but things appear to be working and I'm not totally sure that is related to tiny tds. Notes
|
Thanks! Those warnings are from Rails. I think you did a |
Same issue here with Downgrading from |
Windows 8 pro |
* Use OpenSSL v1.1.0e & FreeTDS v1.00.27 for Windows builds. * Adapt dll names to 1.1.0 scheme - libeay -> libcrypto - ssleay -> libssl * Use perl in Git installation for openssl * OpenSSL Requires Perl >= 5.10, while the Ruby devkit uses MSYS1 with Perl 5.8.8. To overcome this, prepend Git's usr/bin to the PATH. It has MSYS2 with a recent version of perl. * MinGW: Fix inet_pton also for 32-bit
Pull Request #347 pulled in OpenSSL v1.1.0 and we got new versions of TinyTDS at v1.2.0 which should solve this issue. Please reply back and let us know. |
Hate to be the bearer of bad news, but still the same issue with 1.2.0. Created a brand new project, included 1.2.0 and got the following:
|
libsybdb-5.dll depends on libgcc_s_sjlj-1.dll which is not installed by default. Maybe we should use |
I have an engineer on my team who installed the gems for a project yesterday. when they ran the project they got this issue. I had this issue for a couple days, and fixed it through futzing with something on my machine. I can't remember what i did to fix it. Is there an update that was supposed to fix this? |
Yes, v1.3.0 was that fix. |
C:\Sites\hrms>rails c |
So I have also run into this issue on an old project we have (but I found a solution). My environment was: Ruby: ruby 2.3.3p222 (used railsinstaller.org to install ruby) I tried all of the steps mentioned above with no joy (was still getting the same error on the same ActiveRecord call). This included installing the tiny_tds older gem version so my new gem list looked like this: From here I uninstalled 2.0.0 x86-mingw32 version of the gem. Now everything I know about the way that the gem manager handles gems had me convinced this wouldn't have any effect but it seems to have solved the issue (clearly there are still many things I do not know). No other changes were introduced between when I ran with 2.0/1.3/1.0 installed and when I uninstalled to only have 1.3/1.0 |
Upgrading to 1.2 solved to me, windows 10 64b rails installer ruby 2.3 |
Downgrading from Version 2.1.2 to Version 1.3 worked for me |
Downgrading from Version 2.1.2 to Version 1.3 worked for me +1 windows server 2007 service pack 2 |
…qlserver#310 rails-sqlserver#290 rails-sqlserver#349 rails-sqlserver#323 rails-sqlserver#330 * Use OpenSSL v1.1.0e & FreeTDS v1.00.27 for Windows builds. * Adapt dll names to 1.1.0 scheme - libeay -> libcrypto - ssleay -> libssl * Use perl in Git installation for openssl * OpenSSL Requires Perl >= 5.10, while the Ruby devkit uses MSYS1 with Perl 5.8.8. To overcome this, prepend Git's usr/bin to the PATH. It has MSYS2 with a recent version of perl. * MinGW: Fix inet_pton also for 32-bit
Using Windows 7, Enterprise, with MS-SQL 2014 64-bit developer running locally
Using ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32] and
gem 2.4.5.1
SQL server authentication is enabled,
Named pipes and TCP is enabled,
tiny_tds installed (i get the exact same issue with the 32 bit version):
FreeTDS is installed:
from irb i require tiny_tds and get:
I modified the tiny_tds.rb file to get an idea of what is going on:
and get this:
The path "tiny_tds/2.2/tiny_tds" contains:
tiny_tds.so
The tiny_tds folder contains:
So not sure what i'm missing? is there meant to be a compilation step when importing the gem? because that doesn't appear to be happening
If I uninstall and reinstall:
if i go irb and require, i get exactly the same issue.
The text was updated successfully, but these errors were encountered: