I'm trying to install rails, but before I need to install devkit correctly.
So I'm making the normal procedure but I don't understand what's wrong. I'm using ruby 2 x64, and I tried with the DevKit x32 and x64. this is with the devkit x64. What can be wrong in here..? Thank You.
c:\DevKit>gem install json
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
creating Makefile
make
generating generator-x64-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
make install
/usr/bin/install -c -m 0755 generator.so C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems
/json-1.8.0/lib/C/Ruby200-x64/lib/ruby/site_ruby/2.0.0/x64-msvcrt/json/ext
/usr/bin/install: cannot create regular file `C:/Ruby200-x64/lib/ruby/gems/2.0.0
/gems/json-1.8.0/lib/C/Ruby200-x64/lib/ruby/site_ruby/2.0.0/x64-msvcrt/json/ext'
: No such file or directory
make: *** [install-so] Error 1
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-
1.8.0 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-1.8.0/ext/json/ex
t/generator/gem_make.out
NOTE: Before I installed with "ruby dk.rb install -f" in both x32 and x64 cases.
EDIT: For who is attempting to reply about the ruby dk.rb etc. procedure, I've done multiple times this:
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 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-x64
c:\DevKit>ruby dk.rb install -f
[WARN] Updating (with backup) existing gem override for 'C:/Ruby200-x64'
[WARN] Updating (with backup) DevKit helper library for 'C:/Ruby200-x64'
I have also windows with installed java,jdk
I tried
ruby 2.0.0p0 (2013-02-24) [i386-mingw32]
C:\Users\rajarshid>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
Successfully installed json-1.8.0
Parsing documentation for json-1.8.0
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/generator.so, skipping
unable to convert "\x90" from ASCII-8BIT to UTF-8 for lib/json/ext/parser.so, skipping
Installing ri documentation for json-1.8.0
Done installing documentation for json (2 sec).
1 gem installed
Please check whether dev kit install properly or not
ruby dk.rb review
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
Related
I am trying to install json ruby gem on Windows 7 32 System.
The local environment details are
D:\Environment\DevKit32Ruby200>gem -v
2.0.14
D:\Environment\DevKit32Ruby200>ruby -v
ruby 2.0.0p451 (2014-02-24) [i386-mingw32]
D:\Environment\DevKit32Ruby200>rails -v
Rails 4.0.4
I have already tried following things
Downgrading system ruby gems version to 2.3.0 using
gem update --system 2.3.0
I have done proper setting of devkit and manually I added proper ruby directory path in config.yml file.
D:\Environment\DevKit32Ruby200>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.
D:\Environment\DevKit32Ruby200>ruby dk.rb install --force
[WARN] Updating (with backup) existing gem override for 'D:/Environment/ruby200new'
[WARN] Updating (with backup) DevKit helper library for 'D:/Environment/ruby200new'
I have also tried putting platform=ruby
gem install json --platform=ruby --verbose
The error I am getting while installing json is bellow.
D:\Environment\DevKit32Ruby200>gem install json
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
D:/Environment/ruby200new/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR="
generating generator-i386-mingw32.def
compiling generator.c
linking shared-object json/ext/generator.so
make "DESTDIR=" install
/usr/bin/install -c -m 0755 generator.so ./.gem.20170109-8336-qvgvzc/json/ext
make: execvp: /usr/bin/install: Permission denied
make: *** [install-so] Error 127
Gem files will remain installed in D:/Environment/ruby200new/lib/ruby/gems/2.0.0/gems/json-2.0.2 for inspection.
Results logged to D:/Environment/ruby200new/lib/ruby/gems/2.0.0/gems/json-2.0.2/ext/json/ext/generator/gem_make.out
There are 10's of questions are already tagged on this issue but none resolved.
Kindly help me to identify whats missing and why the error coming.
i386-mingw32 is a mountain of pain that'll never be fully supported, when I spent time on Windows I used to use a VirtualBox VM with ubuntu installed which shares a folder with the Windows host. I would edit the files with netbeans in windows and run the code in putty, the VM would basically be headless.
I actually did a lot of real work that way. If you want to do a "Hello World" rails app - OK - good luck even with that. How about an online development environment such as https://c9.io/ ?
But if you want to work, not just play around, set yourself up with an Ubuntu VM at the very least, or work in Ubuntu/MacOS at the very best.
Try this out:
Why don't you download the json .gem file from rubygems.org and install it directly using command
gem install json-x.x.x.gem
I'm following the DevKit to get json gem to install. However it has not worked for me. This has been preventing me to do bundle install. Computer is Win 7 64 bit. Commands for ruby dk.rb init and ruby dk.rb install passed.
ruby 2.1.8p440 (2015-12-16 revision 53160) [x64-mingw32]
Rails 4.2.6
Error
>gem install json --platform=ruby
Temporarily enhancing PATH to include DevKit...
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.
current directory: C:/ruby/lib/ruby/gems/2.1.0/gems/json-1.8.3/ext/json/ext/
generator
C:/ruby/bin/ruby.exe -r ./siteconf20160413-5616-jod3h4.rb extconf.rb
creating Makefile
extconf failed, exit code 1
Gem files will remain installed in C:/ruby/lib/ruby/gems/2.1.0/gems/json-1.8.3 f
or inspection.
Results logged to C:/ruby/lib/ruby/gems/2.1.0/extensions/x64-mingw32/2.1.0/json-
1.8.3/gem_make.out
Check are you getting the proper ruby version in the file after doing ruby dk.rb init, if not specify the proper ruby version as in the program files, then try to run ruby dk.rb install, once this is done devkit is installed and you can install the required gem.
I know it said not to move it, but after I did ruby dk.rb init and ruby dk.rb install I moved it to a different directory because I didn't want it to clutter the directory it was in. I was able to gem install json before, but now when I try to test if it works by running gem install json --platform=ruby I get the following error:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR="
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-1.8.1 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/json-1.8.1/ext/jsln/ext/generator/gem_make.out
How would I go about solving this?
reinstall. from your console, go to the path where you now have the devkit
D:\stuff\devkit
ruby dk.rb init - then open up the config.yml file that lives in that directory... make sure it's pointing to your ruby installation
ruby dk.rb install
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
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.
I have created an and I want to upload that on phpfog but I am getting trouble while uploading my database here on the first step, I have win 7 x64 , I downloaded and installed command prompt with ruby, while creating a tunnel :
C:\Ruby200\devkit>gem install caldecott --platform=ruby
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing caldecott:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb
creating Makefile
make
generating generator-i386-mingw32.def
compiling generator.c
generator.c: In function 'cState_aref':
generator.c:632:5: warning: variable 'state' set but not used [-Wunused-but-set-
variable]
generator.c: In function 'isArrayOrObject':
generator.c:867:5: warning: suggest parentheses around '&&' within '||' [-Wparen
theses]
linking shared-object json/ext/generator.so
make install
/usr/bin/install -c -m 0755 generator.so C:/Ruby200/lib/ruby/gems/2.0.0/gems/jso
n-1.6.8/ext/json/ext/json/ext
/usr/bin/install: cannot create regular file `C:/Ruby200/lib/ruby/gems/2.0.0/gem
s/json-1.6.8/ext/json/ext/json/ext': No such file or directory
make: *** [install-so] Error 1
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/json-1.6.
8 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/json-1.6.8/ext/json/ext/ge
nerator/gem_make.out
C:\Ruby200\devkit>gem install caldecott --platform=ruby
`
I have Win7 x64, Ruby 2.0.0, DevKit (DevKit-mingw64-32-4.7.2-20130224-1151)
I faced the same issue. My solution:
Download gem source from github - https://github.com/cloudfoundry/caldecott/archive/master.zip
Unzip to C:\caldecott (for example)
Open file caldecott.gemspec and change version of json dependency to "~> 1.7"
Open command prompt, move to gem source directory and perfrom:
gem build caldecott.gemspec
gem install caldecott-0.0.5.gem
That's all
This error occurs with Ruby 2.0.0 version. Downgrade to Ruby 1.9.3