# Error Installing json 1.8.1 on Windows

**URL:** <https://discuss.dradis.com/t/error-installing-json-1-8-1-on-windows/23>\
**Category:** Community Edition\
**Created:** [April 18, 2014, 8:28pm UTC](https://discuss.dradis.com/t/error-installing-json-1-8-1-on-windows/23 "2014-04-18T20:28:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soupergrover](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@soupergrover](https://discuss.dradis.com/u/soupergrover)\
**Post date:** [April 18, 2014, 8:28pm UTC](https://discuss.dradis.com/t/error-installing-json-1-8-1-on-windows/23/1 "2014-04-18T20:28:19Z")

</div>

When doing the intial install (or running the reset.bat script), it first gives me the message "No sudo in " and then lists my PATH. Then ig goes through the gems, gets to “installing json 1.8.1” and then I get a pop up from as.exe saying “The procedure entry point libiconv\_set\_relocation\_prefix could not be located in the dynamic link library libiconv-2.dll”

I noted that the PATH statement contains proper entries for Dradis, the Devkit, and my ruby install directory (which I added manually)

Ideas?

---

<div class="post-metadata">

**Author:** ![etd](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/etd/32/5_2.png) [@etd](https://discuss.dradis.com/u/etd)\
**Post date:** [April 21, 2014, 9:18am UTC](https://discuss.dradis.com/t/error-installing-json-1-8-1-on-windows/23/2 "2014-04-21T09:18:31Z")

</div>

I must confess it’s been a little while since I played with Dradis on Windows.

What version of Ruby are you running?

Did you have a look at this one?

> <https://github.com/oneclick/rubyinstaller/issues/129>
>
> I'll start off by saying that I'm not sure how widespread this issue is, it may …just be me, but I would guess from the solution that it has the potential to affect a lot of other people trying to install the DevKit so I decided to post an issue here.
> \## The Problem
> 
> In some cases it seems that the gem install process favors a Windows System version of the libiconv-2.dll file instead of the version that comes with the DevKit install. This causes native gems not to build thus voiding the purpose of the DevKit.
> \## The (Temporary) Solution
> 
> Move the delivered version of libiconv-2.dll (C:\\Windows\\SysWOW64\\libiconv-2.dll) out of the way during native gem installs.
> \## Background and Troubleshooting
> 
> I followed the instructions (https://github.com/oneclick/rubyinstaller/wiki/Development-Kit) and installed the DevKit, but when it came time to test the DevKit by installing the rdiscount gem I would repeatedly get the following error:
> 
> \`\`\`
> C:\\Users\\user\>gem install rdiscount --platform=ruby
> Building native extensions. This could take a while...
> ERROR: Error installing rdiscount:
> ERROR: Failed to build gem native extension.
> 
> C:/Ruby192/bin/ruby.exe extconf.rb
> checking for random()... \*\*\* extconf.rb failed \*\*\*
> Could not create Makefile due to some reason, probably lack of
> necessary libraries and/or headers. Check the mkmf.log file for more
> details. You may need configuration options.
> 
> Provided configuration options:
> --with-opt-dir
> --without-opt-dir
> --with-opt-include
> --without-opt-include=${opt-dir}/include
> --with-opt-lib
> --without-opt-lib=${opt-dir}/lib
> --with-make-prog
> --without-make-prog
> --srcdir=.
> --curdir
> --ruby=C:/Ruby192/bin/ruby
> --with-rdiscount-dir
> --without-rdiscount-dir
> --with-rdiscount-include
> --without-rdiscount-include=${rdiscount-dir}/include
> --with-rdiscount-lib
> --without-rdiscount-lib=${rdiscount-dir}/lib
> C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:368:in \`try\_do': The complier failed to generate an executable file. (RuntimeError)
> You have to install development tools first.
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:435:in \`try\_link0'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:440:in \`try\_link'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:552:in \`try\_func'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:797:in \`block in have\_func'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:693:in \`block in checking\_for'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in \`block (2 levels) in postpone'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in \`open'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:280:in \`block in postpone'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:254:in \`open'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:276:in \`postpone'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:692:in \`checking\_for'
> from C:/Ruby192/lib/ruby/1.9.1/mkmf.rb:796:in \`have\_func'
> from extconf.rb:5:in \`\<main\>'
> 
> 
> Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/rdiscount-1.6.8 for inspection.
> Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/rdiscount-1.6.8/ext/gem\_make.out
> \`\`\`
> 
> After looking around online I came to the conclusion that most people encounter this error when they either:
> \- Didn't have the DevKit installed
> \- Had a space in the path to DevKit
> \- Installed the wrong version of DevKit for their Ruby version
> 
> Since none of these were my problem, I kept trying other things. Eventually I tried running the gem install command in command prompt instead of PowerShell which resulted in a Windows popup directly before the aforementioned error:
> 
> \`\`\`
> as.exe - Entry Point Not Found
> 
> The procedure entry point libiconv\_set\_relocation\_prefix could not be
> located in the dynamic link library libiconv-2.dll
> \`\`\`
> 
> This caused me to start searching around for other versions of libiconv-2.dll (a DDL file that is delivered in both C:\\DevKit\\mingw\\bin and in C:\\DevKit\\mingw\\libexec\\gcc\\mingw32\\4.5.2 by the DevKit installer) on my system which I eventually found in C:\\Windows\\SysWOW64.
> 
> After renaming the libiconv-2.dll file in C:\\Windows\\SysWOW64 the gem install of rdiscount worked perfectly. However, renaming this dll permanently isn't a viable solution long-term since I'm sure that the Windows system needs that DLL for other things.
> 
> So I'm guessing that this worked because in an ideal situation the DevKit's version of libiconv-2.dll should override the version that Windows provides during a native gem install? I tried moving DevKit's version to the very front of my system path, but this didn't seem to work for me.

---

<div class="post-metadata">

**Author:** ![raesene](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.dradis.com/raesene/32/18_2.png) [@raesene](https://discuss.dradis.com/u/raesene)\
**Post date:** [April 21, 2014, 8:26pm UTC](https://discuss.dradis.com/t/error-installing-json-1-8-1-on-windows/23/3 "2014-04-21T20:26:43Z")

</div>

One thing I would recommend is to avoid ruby 2.0 on windows and probably the x64 build (so stick with 1.9.3 and 32-bit) there’s several gems (nokogiri, redcloth) which have problems on 2.0/x64 and are tricky or impossible to work around…

---

<div class="post-metadata">

**Author:** ![soupergrover](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@soupergrover](https://discuss.dradis.com/u/soupergrover)\
**Post date:** [April 21, 2014, 11:51pm UTC](https://discuss.dradis.com/t/error-installing-json-1-8-1-on-windows/23/4 "2014-04-21T23:51:01Z")

</div>

That did it! I renamed the dll in my system32 directory and all installed and compiled perfectly.

Thanks for the help
