3

I am using the latest version of Ruby; I have downloaded it, [from here] (http://rubyinstaller.org/downloads/). My installer is: http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-2.2.2.exe.

Then, I have installed it into my Windows XP computer. I am using 32-bit system.

But; when I run ruby.exe, it always returns this error message:

The procedure entry point _gmtime64_s could not be located in the dynamic link library msvcrt.dll.

Some older versions (before of 1.9.3) can run without this error message, on my computer.

Is there any suggestion to fix this error?

sepp2k
  • 363,768
  • 54
  • 674
  • 675
  • given the proc entry point name, I'm going to guess that you've downloaded a 64bit version of ruby and are trying to run it on a 32 bit architecture. – mcfinnigan Aug 12 '15 at 12:31
  • @d96p I understand that you are using a 32-bit operating system, but it IS possible that you downloaded a 64-bit version of Ruby. Make sure your downloaded file does not have x64 in the filename. Also, you tagged msvcrt. Could you explain how that is involved? You may want to tag "windows" as well. Ruby is always difficult to install on Windows, so do not worry. It will work soon. – onebree Aug 12 '15 at 12:49
  • 1
    @mcfinnigan: The 64 here means 64-bit `time_t`. – cremno Aug 12 '15 at 13:08
  • 1
    [XP is not supported anymore by Ruby Installer](https://github.com/oneclick/rubyinstaller/issues/271), Ruby (MRI/CRuby) itself still supports it though. – cremno Aug 12 '15 at 13:10
  • Possibly not related, but 2.2.x has a lot of issues on Windows in general. Try 2.1.x? – CuddleBunny Aug 12 '15 at 14:11

1 Answers1

4

The error message gives us all the information we need. The executable ruby.exe is linked to msvcrt.dll (you're not supposed to do that, but never mind) which is the C runtime that Windows itself uses.

The missing function is _gmtime64_s which we can look up in MSDN. It turns out that this function was only added in Visual Studio 2005, i.e., after Windows XP was released, so it is unsurprising that the Windows XP runtime does not include it.

Conclusion: the version of ruby.exe you've downloaded requires at least Windows Vista.

Harry Johnston
  • 35,639
  • 6
  • 68
  • 158