I am having a problem in installing devkit of ruby on rails. Here's the error I got
C:\DevKit>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
C:/Ruby192
C:/Ruby192/include/ruby-1.9.1
C:\DevKit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby192'
[INFO] Installing 'C:/Ruby192/lib/ruby/site_ruby/devkit.rb'
[ERROR] Unable to find RubyGems in site_ruby or core Ruby. Please install RubyGems and rerun 'ruby dk.rb install'.
Please help me
Thanks
The error is that you added C:/Ruby192/include/ruby-1.9.1 to the list of Ruby installations.
By default dk.rb will not find that and actually that is not a valid path.
Please ensure config.yml contains just this:
- C:/Ruby192
The dash is important
Once you do that, try ruby dk.rb install again.
Open config.yml and configure the diretory of Ruby EX: C:/Ruby192
Related
I want to learn Ruby and i found an warning message in console while installation.
I have installed Ruby 2.0.0-p481 (x64) and extracted the DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe successfully.
Then i executed following command:
chdir C:\DevKit
ruby dk.rb init
ruby dk.rb install
Then i noticed the following in my console:
C:\Users\parthap>chdir C:\DevKit
C:\DevKit>ruby dk.rb init
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all of
the installed Rubies you want enhanced by the DevKit.
C:\DevKit>ruby dk.rb install
Invalid configuration or no Rubies listed. Please fix 'config.yml' and
rerun 'ruby dk.rb install
I am not getting any config.yml file.I can see a config.h file.
and what should be fixed there?
Thanks
Able to install ruby 1.9.3
previously was trying with Ruby 2.0.0
Ruby 2.0.0, specially the 64bits version, are relatively new on the Windows area and not all the packages have been updated to be compatible with it. To use this version you will require some knowledge about compilers and solving dependency issues, which might be too complicated if you just want to play with the language.
Thanks
I downloaded rubyinstaller-2.0.0-p247 and DevKit-mingw64-64-4.7.2-20130224-1432-sfx
Follow all the steps from https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
I am getting following error:-
ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
C:\Users\NISHA>cd ..
C:\Users>cd..
C:\>cd Ruby200
C:\Ruby200>ruby -v
ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
C:\Ruby200>gems -v
'gems' is not recognized as an internal or external command,
operable program or batch file.
C:\Ruby200>cd..
C:\>cd Devkit
C:\Devkit>ruby dk.rb init
[INFO] found RubyInstaller v2.0.0 at C:/Ruby200
Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.
C:\Devkit>ruby dk.rb review
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
C:/Ruby200
C:\Devkit>ruby dk.rb install
[INFO] Updating convenience notice gem override for 'C:/Ruby200'
[INFO] Installing 'C:/Ruby200/lib/ruby/site_ruby/devkit.rb'
C:\Devkit>rails -v
'rails' is not recognized as an internal or external command,
operable program or batch file.
Can any one Please help me into this.
It doesn't look like you have rubygems installed, which is the remit of devkit
There is a good tutorial here
I think your error is because you're using gems in command line. Try using gem -v and you'll see that it will work. If you use the singular gem, you can then fire gem install rails, to get it so you're able to install rails directly
I have successfully installed Ruby using the 'rubyinstaller-1.9.3-p484.exe' but I am unable to install Rails. I get an error 'The 'json' native gem requires installed build tools.'
How do I resolve this ?
If the devkit made changes to the PATH, you will have to restart the cmd terminal.
1) Download Ruby 1.9.3
2) Download DevKit file from http://rubyinstaller.org/downloads (DevKit-tdm-32-4.5.2-20110712-1620-sfx.exe)
3) Extract DevKit to path C:\Ruby193\DevKit
4) cd C:\Ruby193\DevKit
5) ruby dk.rb init
6) ruby dk.rb review
7) ruby dk.rb install
you can verify the rails installation by typing this on command prompt
rails -v
I'm trying to install a rails app on Windows. When I invoke this command:
bundle install
I get this error:
How to fix it?
You need to install a Ruby Development Kit as described here: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
It will install a mingw environment allowing rubygems to compile binary gems for the Windows platform.
Be careful to follow the post-installation steps described in this section: https://github.com/oneclick/rubyinstaller/wiki/Development-Kit#4-run-installation-scripts
Simply having the ruby-devkit files on your hard-drive is not enough for rubygems to make use of it.
The bundle install commands are included with the Ruby DevKit.
Make sure that if you've correctly installed the Ruby Dev Kit (https://rubyinstaller.org/add-ons/devkit/) it can also find where Ruby is installed on your HD.
When you use the command ruby dk.rb init you should get a message like this
[INFO] found RubyInstaller v2.3.3 at C:/Ruby23-x64
You can also use the ruby dk.rb review command to ensure that the DevKit has found your install path for Ruby. You should get a message like this
Based upon the settings in the 'config.yml' file generated
from running 'ruby dk.rb init' and any of your customizations,
DevKit functionality will be injected into the following Rubies
when you run 'ruby dk.rb install'.
C:/Ruby23-x64
Once you're happy with the directories specified in the config file, run the ruby dk.rb install command. If you're reinstalling the DevKit, you can use the -f command to overwrite anything done previously.
You should see something like this (if you used the -f):
[WARN] Updating (with backup) existing gem override for 'C:/Ruby23-x64'
[WARN] Updating (with backup) DevKit helper library for 'C:/Ruby23-x64'
Once that's done, you can check to see that your Devkit has installed properly by running the install json --platform=ruby command, after which you should see:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed json-2.1.0
Parsing documentation for json-2.1.0
Installing ri documentation for json-2.1.0
Done installing documentation for json after 2 seconds
1 gem installed
Once your json install starts, you know your DevKit has installed successfully, which should prevent the 'make' error from occurring.
This question already has answers here:
The 'json' native gem requires installed build tools
(8 answers)
Closed 7 years ago.
i m installing Rails 3 on my windows.
I installed latest ruby 2.0.0, and i updated gems.
but when i installing rails by using gem install rails , successful message has come but at last i found
ERROR: Error installing rails:
The 'atomic' 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'
plese help me...
As error message said, you need to install Ruby DevKit which can be obtained from RubyInstaller.org. (also need to check suitable Devkit version from there..)
And extract the DevKit zip file into somewhere (you are using windows then-> : c:\xxxx)
Navigate to c:\xxxx and run "ruby dk.rb init" and then "ruby dk.rb install"..
And try to re-insall rails..
I hope this helps,
I have also gone through the same problem. After doing a lot of research, I found a solution that works.
Run this command:
pik list
It should show you
187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
192: ruby 1.9.2p290 (2011-07-09) [i386-mingw32]
193: ruby 1.9.3p327 (2012-11-10) [i386-mingw32]
200: ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
If it's not pointing to Ruby version 200 then run the following:
pik use 200
Now run the following to enhance DevKit to your installed Ruby:
ruby dk.rb install
Finally, run the following:
gem install rails
This will install latest Rails version 4 for Ruby 2.0.
I also gone through the same problem. :) but is my first install of ruby on windows and "pik" is not avaible
so i place me in the devkit folder and try : ruby dk.rb init
and
ruby dk.rb install
and finaly
gem install rails
...
no more faillure
github.com tells us that:
The path to your RUBY_INSTALL_DIR must not contain any whitespaces (like in “C:\Program Files\Ruby193”). This is very important because whitespaces in the path to your ruby installation will cause certain error messages as soon as you try to install gems which require the DevKit.
This solved the problem of this kind for me.
You're probably not going to like this answer but if you go:
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
like it says in the message it actually helps you quite a bit.
It tells you to install the Development-Kit then cd to the directory that you put it the run “ruby dk.rb init” and “ruby dk.rb install” and when it finishes then you can run "gem install rails" and it simply works.
Easy to miss as I didn't see it the first time either