Ruby Installation Error - ruby-on-rails

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

Related

rbenv: version `2.0.0' is not installed

I'm trying to install the Gemfile contents using Bundle install but getting the error
rbenv: version `2.0.0' is not installed
The version of ruby installed in my system is:
ruby 2.1.2p95 (2014-05-08 revision 45877) [i686-linux]
and rbenv
2.1.2 (set by /home/jay/.rbenv/version)
2.1.3
The Gemfile requires ruby "2.0.0". Can any one tell how to install the required version without affecting the existing ones.
You can find a lot of information here: rbenv on github
To list all available installation candidates:
rbenv install -l
To install a ruby version you need (for example):
rbenv install 2.0.0-p643
So that you will only use this ruby version in this specific folder and not affect anything else you can do:
rbenv local 2.0.0-p643
This will generate a .ruby-version file in that directory which will force rbenv to use this ruby version here.
Just run:
rbenv install 2.0.0-p643
Which is the lastest 2.0.0 version.
If that version is not available on your system, run ruby-build --definitions to pick the lastest known 2.0.0 version on your system.
For me, I just ran
gem install bundler
and then run
bundle install
worked like a charm
You must change the ruby's version in .ruby-version file and in Gemfile
If you are getting a build failed error when trying to run rbenv install 2.0.0-p643 and after waiting for a few minutes; you might also see the last 10 lines of a log file as an output.
This can give you the hint of what would have happened for the build failure. It might miss some required library/dependency needed to be installed.
For ex. I got the following error for build failure-
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libreadline-dev` to fetch missing dependencies.

Ruby on rails Installation error not able to install rails

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

Make is not recognized as internal or external command

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.

Rails Installation error :The 'atomic' native gem requires installed build tools [duplicate]

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

Ruby on rails devkit windows

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

Resources