"Msvcrt-Ruby18.Dll Was Not Found" with Ruby

msvcrt-ruby18.dll was not found with Ruby

The current release version 1.1.5 of Mongrel is incompatible with Ruby 1.9 and throws this error when it is run. It's easy to solve - just make sure Rubygems is up-to-date:

gem update --system

Then install the new pre-release version of Mongrel:

gem install mongrel --pre

Alternatively, if this isn't caused by Mongrel, you can try installing the DevKit, then try this:

gem install *gemname* --platform=ruby

This forces compilation of the extension from source using DevKit and works with most of the major gems I've tried.

RUBY ON RAILS - msvcrt-ruby18.dll was not found with Ruby

Which version of ruby you are using?

If <= 1.8 then just add that dll to your path (you should have it somewhere).

If, instead, you are using ruby >= 1.9 then probably one of your gems that you installed has native compnents which haven't been updated for this version and still rely on older ruby dlls. You could try by compiling them natively (it will be hard under Win7) or search for an updated version somewhere.

Getting the error msvcrt-ruby18.dll is missing when running watir scripts after installing rubyinstaller-1.9.2-p136

To fix this error, we need to register the autoit dll "AutoItX3.dll". In my machine the dll is located at C:\Ruby192\lib\ruby\gems\1.9.1\gems\rautomation-0.6.3\ext\AutoItX. So, you need to goto this folder in command prompt and execute "regsvr AutoItX3.dll". That fixed the problem

msvcrt-ruby18.dll not found when trying to use Heroku for Windows XP

FYI our solution was to install Ruby 1.8.7. Since Ruby has added significant performance benefits in 1.9.2, it's not a great solution, but then again, neither is developing web apps locally on Windows XP ;)

Problem with Ruby on Rails on Windows[msvcrt-ruby18.dll error] - newbie questions

I tried switching from Windows to Ubuntu and had the same, if not more trouble getting Ruby + Rails to work properly. In my opinion Rails especially is still in a state where if you aren't personally involved in the project, it is very hard to start using. I hear a lot of people talk about how easy it is to use Ruby on Rails, when in reality if you want to create anything more than a blog application (which is what 99% of it's tutorials are about) you end up spending just as much time as with any other framework.

Update - A year later.

I've tried Ruby on Rails again and this time started out with Rails Installer, a really easy way to get Rails running on Windows (although it is frustratingly slow sometimes). All in all, the Rails Tutorial is definitely the best way to learn Rails.

Building a Ruby stack on Windows Server: msvcrt-ruby18.dll

Seems you're trying to install binary gems for Mongrel on Ruby 1.9.3 when mongrel binaries only work for Ruby 1.8.x

Mongrel hasn't been updated to work with latest Ruby or Rails, so please avoid using it at this time.

You can use Thin as alternative:

gem install eventmachine --pre
gem install thin

The pre-installation of eventmachine pre-release version is required since latest stable 0.12 does not work with Ruby 1.9.x on Windows.

Also, if you're using a version of Windows Server, please ensure Ruby executable (ruby.exe) is added to the DEP exclusion list:

https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#wiki-dep_segfault

Errors with shotgun gem and msvcrt-ruby18.dll when running my Sinatra app

The msvcrt-ruby18.dll error is caused by Mongrel. The current release version 1.1.5 is incompatible with Ruby 1.9 and throws this error when it is run. It's easy to solve - just make sure gems is up-to-date:

gem update --system

Then install the new pre-release version of Mongrel:

gem install mongrel --pre

Importing Ruby from C# (Windows)

OK, so finally figured this out, will post the answer here for anyone else who may stumble into a similar problem.

I ended up manually adding the directories for Ruby's dependencies via "AddDllDirectory":

    [DllImport("kernel32", CharSet = CharSet.Unicode, SetLastError = true)]
static extern bool AddDllDirectory(string lpPathName);

And then using "LoadLibraryEx" opposed to "LoadLibrary", and specifying the "LOAD_LIBRARY_SEARCH_DEFAULT_DIRS" flag.

        [DllImport("kernel32", SetLastError = true)]
static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hReservedNull, LoadLibraryFlags dwFlags);

[System.Flags]
enum LoadLibraryFlags : uint
{
DontResolveDllReferences = 0x00000001,
LoadIgnoreCodeAuthzLevel = 0x00000010,
LoadLibraryAsDatafile = 0x00000002,
LoadLibraryAsDatafileExclusive = 0x00000040,
LoadLibraryAsImageResource = 0x00000020,
LoadLibrarySearchApplicationDir = 0x00000200,
LoadLibrarySearchDefaultDirs = 0x00001000,
LoadLibrarySearchDllLoadDir = 0x00000100,
LoadLibrarySearchSystem32 = 0x00000800,
LoadLibrarySearchUserDirs = 0x00000400,
LoadWithAlteredSearchPath = 0x00000008
}

And then...

    public static void Initialize(string rubyDllPath = null)
{
AddDllDirectory(@"C:\Ruby24\bin");
AddDllDirectory(@"C:\Ruby24\bin\ruby_builtin_dlls");

_rubyLib = new RubyHandle(rubyDllPath ?? RUBY_DLL);
ImportFunctions();
_ruby_init.Invoke();
}

Obviously the final product will do this dynamically, but this way successfully loads the library.

Install two versions of Ruby on XP (kinda safely)?

I use pik and it works. You could also set up a Linux virtual box (EngineYard has built an InstantRails VM using Vagrant).

Your msvcrt-ruby18.dll error might be due to the mongrel gem or the json gem-- check out this question for how to fix it.



Related Topics



Leave a reply



Submit