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
Related
I am trying to install gem json and getting error for json.
I'm running:
Windows 8.1 (64 bit)
Ruby: ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
gem: 1.8.2
D:\GIT\calabash>gem install json -v '1.8.3'
Building native extensions. This could take a while...
The system cannot find the path specified.
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
D:\GIT\calabash>
Its a late response, but may it helps someone else. to install json '1.8.3' it requires packages 'libgmp3-dev'.
Use following steps:
sudo apt-get install libgmp3-dev
gem install json -v '1.8.3'
For anyone who has this issue on Sierra, I solved the problem through this thread: https://teamtreehouse.com/community/installing-ruby-on-mac-got-error
Coles notes version is that after updating to most recent version of XCode, I had to accept the terms for the XCode command line tools. See them/agree to them by running:
gcc --version
After I did that, everything installed as expected.
To help you here are some steps to follow in order to install your gem locally:
Download json-1.8.3.
Place the downloaded gem into a folder called gems
Open the Ruby cmd console (click on start button, select Ruby then select "Start command prompt with Ruby")
cd to the gems folder. If the path to the folder is C:\Desktop\gems, write the command: cd C:\Desktop\gems then click "Enter".
To install the gem run the following command:
gem install --local json-1.8.3.gem
I tried it and it worked for me, hopefully it will work for you.
Result:
Second way:
Include the whole path of the gem in the command:
gem install --local C:\Users\kedarl\Desktop\T\json-1.8.2.gem
For me here is the result. (This time with the json-1.8.2.gem):
I've solved this by installing Command Line Tools Xcode of the version I have. I hope this helps someone else.
If you installed Rails through RailsInstaller, try this -
https://gist.github.com/luislavena/f064211759ee0f806c88
It's a pretty common bug for RailsInstaller currently.
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
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.
Running with Ruby 1.9.2
The IDE complains that The gem ruby-debug-base19x is required and offers to install it.
However, upon attempting to install it it displays the message
Failed to install gems. Following gems were not installed: C:/Program
Files (x86)/JetBrains/RubyMine
3.2.4/rb/gems/ruby-debug-base19x-0.11.30.pre2.gem: Error installing ruby-debug-base19x-0.11.30.pre2.gem: The 'linecache19' 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'
C:/Program Files (x86)/JetBrains/RubyMine
3.2.4/rb/gems/ruby-debug-ide-0.4.17.beta8.gem: Error installing ruby-debug-ide-0.4.17.beta8.gem: The 'ruby-debug-ide' 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'
linecache19 (0.5.12): Error installing linecache19: The 'linecache19'
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 followed its advice to download the DevKit - but the DevKit upon attempting to install, said that it was already correctly installed as part of Ruby.
Any advice?
The problem is not specific to RubyMine, I'd try to reinstall Ruby and DevKit from scratch.
Verify that DevKit actually works using a test from the installation guide:
gem install rdiscount --platform=ruby
ruby -rubygems -e "require 'rdiscount'; puts RDiscount.new('**Hello RubyInstaller**').to_html"
If it works fine, try to install the debug gems manually from the console using the following commands:
gem install ruby-debug-base19x --pre
gem install ruby-debug-ide --pre
Post logs, provide more details if it still doesn't work for you.
The gem that rubymine debugger installs by itself conflicts with the existing debug gem in the gemset. Uninstall the existing debug gems, you can get a list by running gem list | grep debug and let rubymine install its own version. Also make sure that you do not have a debug gem mentioned in the Gemfile and also there should not be any debug gem in the global gemset.
I had the same problem.
i was able to get it working by uninstalling and reinstalling RubyMine. Then everything worked perfectly, as expected.
There is an open issue on this at the RubyMine forum. The answer by Roman Melnik worked for me (but my environment is Mac OS).
I have ruby 1.9.2p180 (2011-02-18) [i386-mingw32] installed on my windows 7 machine. Now I tried to install the JSON gem using the command, "gem install json" and got the following error.
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][1]' and follow the instructions
at '[http://github.com/oneclick/rubyinstaller/wiki/Development-Kit][2]'
Then I went and downloaded DevKit-4.5.0-20100819-1536-sfx.exe. Extracted it to C:\DevKit. And then from the command prompt, I executed the following commands.
ruby dk.rb init
After the above command is executed, I verified that config.yaml is generated and it has the path for my ruby folder added automatically. This is the line at the bottom of the config.yaml file "- C:/Ruby192"
ruby dk.rb review
I got the message that devkit functionality will be injected into the rubies when you run "ruby dk.rb install"
ruby dk.rb install
I got the following message.
[INFO] RubyGems override already in place for C:/Ruby192, skipping.
[INFO] Installing C:/Ruby192/lib/ruby/site_ruby/devkit.rb
Now I tried executing the JSON gem again using the command gem install json. Then got the same error message as before.
ERROR: Error installing JSON:
The 'json' native gem requires installed build tools.........
Am I missing something?
Follow the Instructions from the Ruby Installer Developer Kit Wiki:
Download Ruby 1.9.3 from rubyinstaller.org
Download DevKit file from rubyinstaller.org
For Ruby 1.9.3 use DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe
Extract DevKit to path C:\Ruby193\DevKit
Run cd C:\Ruby193\DevKit
Run ruby dk.rb init
Run ruby dk.rb review
Run ruby dk.rb install
To return to the problem at hand, you should be able to install JSON (or otherwise test that your DevKit successfully installed) by running the following commands which will perform an install of the JSON gem and then use it:
gem install json --platform=ruby
ruby -rubygems -e "require 'json'; puts JSON.load('[42]').inspect"
I believe those installers make changes to the path. Did you try closing and re-opening the CMD window after running them and before the last attempt to install the gem that wants devkit present?
Also, be sure you are using the right devkit installer for your version of Ruby. The documentation at devkit wiki page has a requirements note saying:
For RubyInstaller versions 1.8.7, 1.9.2, and 1.9.3 use the DevKit
4.5.2
I have found that the error is sometimes caused by a missing library.
so If you install RDOC first
by running
gem install rdoc
then install rails with:
gem install rails
then go back and install the devtools as mentioned before with:
1) Extract DevKit to path C:\Ruby193\DevKit
2) cd C:\Ruby192\DevKit
3) ruby dk.rb init
4) ruby dk.rb review
5) ruby dk.rb install
then try installing json
which culminate with you finally being able to run
rails new project_name - without errors.
good luck
Followed the steps.
Extract DevKit to path C:\Ruby193\DevKit
cd C:\Ruby192\DevKit
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
Then I wrote the command
gem install rails -r -y
1) Download Ruby 1.9.3
2) cmd check command: ruby -v 'return result ruby 1.9.3 then success full install ruby
3) Download DevKit file from http://rubyinstaller.org/downloads (DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe)
4) Extract DevKit to path C:\Ruby193\DevKit
5) cd C:\Ruby193\DevKit
6) ruby dk.rb init
7) ruby dk.rb review
8) ruby dk.rb install
9) cmd : gem install rails -v3.1.1 'few time installing full process'
10) cmd : rails -v 'return result rails 3.1.1 then its success fully install'
enjoy Ruby on Rails...
I would like to add that you should make sure that the generated config.yml file when doing ruby dk.rb init contains the path to the ruby installation you want to use DevKit with. In my case, I had the Heroku Toolbelt installed on my system, which provided its own ruby installation, located at a different place. The config.yml file used that particular installation, and that's not what I wanted. I had to manually edit the file to point it to the correct one, then continue with ruby dk.rb review, etc.
My solution is simplier and checked on Ruby 2.0. It also enable download Json. (run CMD.exe as administrator)
C:\RubyDev>devkitvars.bat
Adding the DevKit to PATH...
And then write again gem command.
My gem version 2.0.3 and I was getting the same issue.
This command resolved it:
gem install json --platform=ruby --verbose