Cannot install Ruby DevKit on Windows 8 - ruby

Please help me, I am desperate.
I am encountering the following error when installing different gems:
Building native extensions. This could take a while...
ERROR: Error installing bson_ext:
ERROR: Failed to build gem native extension.
...
For this reason I want to install the Ruby DevKit. I am using the proper version (Ruby 1.9.3-p429 with DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe).
I followed the proper steps:
ruby dk.rb init
ruby dk.rb review => yes, C:\Ruby193 is appearing in config.yml
ruby dk.rb install => here comes my problem. When I execute the command (in an elevated cmd), I only get these two messages:
[INFO] Updating convenience notice gem override for 'C:/Ruby193'
[INFO] Installing 'C:/Ruby193/lib/ruby/site_ruby/devkit.rb'
After that I try to verify that the DevKit is installed correctly, so I run:
gem install json --platform=ruby
and I still get the same error as at the beginning (ERROR: Failed to build gem native extension.)
Please, help!
P.S. Some additional info: when I go to C:\Ruby193\bin gcc.bat, make.bat, and sh.bat are not present, which is probably at the root of my problem...

change your system path to add devkit

It is important to note the version of the Ruby installation. I used Ruby 32 bit installation on a 64 bit machine and i tried to download the 64 bit Devkit. Even when I added the path this was useless because by ruby installation was 32 bit. So I downloaded the 32 bit Devkit and it successfully installed. Thanks for these wonderful answers and questions. They all helped.

Related

installation of jekyll failed - Windows

I am trying to install jekyll on a 32 bit windows 7 PC . I downloaded ruby installer-32 bit and 32 bit devkit and extracted un ruby install folder.i got some ssh error which i resolved by temporarily switching to http instead of https and then updated gems as well as installed bundler using
gem install bundler
however gem install jekyll gives following error
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
C:/Ruby21/bin/ruby.exe -r ./siteconf20150109-5804-1k3wbva.rb extconf.rb
No such file or directory - C:/Ruby21/bin/ruby.exe -r ./siteconf20150109-5804-1k
3wbva.rb extconf.rb 2>&1
Gem files will remain installed in C:/Ruby21/lib/ruby/gems/2.1.0/gems/fast-stemm
er-1.0.2 for inspection.
Results logged to C:/Ruby21/lib/ruby/gems/2.1.0/extensions/x86-mingw32/2.1.0/fas
t-stemmer-1.0.2/gem_make.out
You need to install the Ruby DevKit to fix the error you're seeing. Any sane Ruby install has the ability to build stuff on the fly.
I would start with Julian Thilo's awesome instructions for installing Jekyll on Windows:
Run Jekyll on Windows
If you are installing Ruby only for the purpose of running Jekyll, PortableJekyll will give you a full working Jekyll install in < 5 minutes.
Happy Jekylling...
I tried the same thing on 3 systems and found out that installing ruby gems fixed the issue .. so for anyone coming back at this question , this is how you install jekyll on a windows pc:
1.download and install ruby.
2.download devkit extract in to a folder(preferably inside ruby installation dir) and type in cmd window while in your devkit dir :
ruby dk.rb init
ruby dk.rb install
3.download and install gems by
ruby setup.rb
4. finally :
gem install bundler
gem install jekyll
*bundler is a jekyll dependency
I had the same issue on Windows 10 after installing Ruby+Devkit 2.5.X (x64) with the Windows installer.
The reason was that I changed the default path in the installer and had spaces in the path name. Apparently some make scripts do not like that.
Reinstalling to a path without any spaces fixed the issue.
Also see this related issue on github.
I failed to install "gem install jekyll bundler" when ruby was installed in "c:\program files\Ruby26-x64". After I reinstalled ruby on c:\Ruby26-x64 everything went ok. Seems like installation fails to parse path with blank

Error installing json gem: The 'json' native gem requires installed build tools

When i'm trying to install this gem it claims that i need to have a devkit installed although i am sure i do have it. It also suggests that i need to update my systems variables in PATH which i have directly linked to the devkit file in ruby. I have seen other questions on Stack Overflow and they didn't work with my issue.
here is the full error message:
C:\Users\Mahamoud>gem install json
ERROR: Error installing json:
The 'json' native gem requires installed build tools.
Please update your PATH to include build tools or download the DevKit
from 'http://rubyinstaller.org/downloads' and follow the instructions
at 'http://github.com/oneclick/rubyinstaller/wiki/Development-Kit'
I've tried uninstalling and re installing ruby and still no result.
i have my devkit located in the C:\Ruby193\bin
There are detailed steps for installing DevKit here:
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
And to test that your installation is working correctly, you are supposed to try this:
gem install json --platform=ruby
So, you should already have json installed. Instead of reinstalling ruby, I would try reinstalling DevKit...and follow the directions EXACTLY.

Installation issue in sproutcore

I was installing Sproutcore while installation I was facing issue saying that "Error installing Sproutecore: The 'http_parser.rb' native gem requires installed build tools. Please update your PATH to include build tool...".
Check below screenshot of my command prompt.
I thought this error generate because I didn't set ruby path in environment variable but after setting up path I am facing same error. Please advise.
I follow this link to install sproutcore.
Install This DevKit:
https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe
after installation go to devkit dir and run this following command
ruby dk.rb init
ruby dk.rb install
gem install rdiscount --platform=ruby

Install ruby devkit on Windows

I'm trying install devkit to instal some gems. I downloaded files and extracted properly and run ruby dk.rb init and file config.yml was created right.
When i run ruby dk.rb install i got this:
[INFO] Skipping existing gem override for 'C:/Ruby200-x64'
[WARN] Skipping existing DevKit helper library for 'C:/Ruby200-x64'
I would delete C:/Ruby200-x64 and re-extract. Then run 64 bit devkit install again. You shouldn't get that error message.
For the record though, I have a working ruby 2.0 on windows 7, and that gem wouldn't build for me either. It installed fine on 1.9.3 though.
In my opinion we're about a year away from seeing 2.0 be usable on windows.

How to install a ruby gem on windows 7

Sorry to ask such a basic question. I'm trying to install tiny_tds as explain on this page. I've tried $ gem install tiny_tds, I'm getting error: Syntaxt error, unexpected $undefined. If I remove $, the error becomes undefined local variable or methos "tiny_tds". I don't know where to start to install a gem. I'm using the ruby command prompt.
Thanks for helping
I guess you should try railsinstaller for windows that includes rubygems. Then gem install tiny_tds in the command prompt.
You need to download the Ruby installer depending on you systems settings (32 or 64 bit) and the ruby development kit in order to run command lines. Here is a link to the installer and a simple guide for installing the DevKit for ruby on windows (this one is to make jekyll run on windows, jekyll is other ruby gem):
Ruby Installer:
http://rubyinstaller.org/downloads/
Devkit configuration:
http://www.madhur.co.in/blog/2011/09/01/runningjekyllwindows.html

Resources