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
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've been trying to gem install pg on many different ways I've found on the internet and none work. They all give the same error.
What I've tried :
gem install pg -- --with-pg-dir=C:\Program Files (x86)\PostgreSQL\9.3:
gem install pg -- --with-pg-dir=C:\Program Files\PostgreSQL\9.5:
gem install pg
Using bundle install after editing the Gemfile.
Every single time I get this error:
C:\laragon\www\ruby\Car-X>gem install pg Building native extensions. This could take a while... C:/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/ext/ext_conf_builder.rb:56: warning: Tempfile#unlink or delete called on open file; ignoring ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
current directory: C:/jruby-9.1.2.0/lib/ruby/gems/shared/gems/pg-0.18.4/ext C:/jruby-9.1.2.0/bin/jruby.exe -r ./siteconf20160629-8568-1ou7emz.rb extconf.rb NotImplementedError: C extensions are not supported
<top> at C:/jruby-9.1.2.0/lib/ruby/stdlib/mkmf.rb:1 require at org/jruby/RubyKernel.java:944 (root) at C:/jruby-9.1.2.0/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1
<top> at extconf.rb:2
extconf failed, exit code 1
Gem files will remain installed in C:/jruby-9.1.2.0/lib/ruby/gems/shared/gems/pg-0.18.4 for inspection. Results logged to C:/jruby-9.1.2.0/lib/ruby/gems/shared/extensions/universal-java-1.8/2.3.0/pg-0.18.4/gem_make.out
Any help would be apreciated.
You need to install the ruby devkit so that your ruby compiler can deal with native C code.
Check out the instructions on how to do so here:
https://github.com/oneclick/rubyinstaller/wiki/Development-Kit
Once you've installed it, make sure that your windows PATH environmental variable includes a link to the bin folder in your newly created devkit directory. (P.S. Make sure there are no spaces in the path to the directory).
This error occurs when I try to install http_parser using gem:
dongl_000#LENNY ~/ava-home (master)
$ gem install http_parser.rb -v '0.6.0'
Building native extensions. This could take a while...
ERROR: Error installing http_parser.rb:
ERROR: Failed to build gem native extension.
c:/Ruby22-x64/bin/ruby.exe -r ./siteconf20160217-15056-1hoiyfc.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating ruby_http_parser-x64-mingw32.def
make: *** No rule to make target '/c/Ruby22-x64/include/ruby-2.2.0/ruby.h', need
ed by 'ruby_http_parser.o'. Stop.
make failed, exit code 2
Gem files will remain installed in c:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/http_p
arser.rb-0.6.0 for inspection.
Results logged to c:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0
/http_parser.rb-0.6.0/gem_make.out
How can I resolve this issue?
Versions
ruby : 2.2.1
rubyGem : 2.4.5
I was going through this very same issue.
Looked up the Git Repository for the Gem (HTTP_Parser) and found out the reason for my problem:
HTTP_Parser currently doesn't not support a Path with spaces
So I renamed my path and solved it.
To resolve attempt to add the devkit to Ruby like this:
Install Ruby+DevKit from RubyInstaller: Ruby Window Installers
Downloads
Check the "ridk install" checkbox at the end of the installer.
When RIDK runs, pick option 3 to install both MSYS and MINGW dev tools (make is provided with the MINGW stuff).
Open a fresh console (to get fresh environment variables), and rerun your gem or bundle command...and hope for the best.
While I am trying to create the new rails project, I face to error that is related to the lack of json gem.
When I try to install json gem, this error happens:
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:/Ruby22-x64/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating generator-x64-mingw32.def
compiling generator.c
In file included from c:/Ruby22-x64/include/ruby-2.2.0/ruby/ruby.h:29:0,
from c:/Ruby22-x64/include/ruby-2.2.0/ruby.h:33,
from ../fbuffer/fbuffer.h:5,
from generator.c:1:
c:/Ruby22-x64/include/ruby-2.2.0/ruby/defines.h:26:19: fatal error: stdio.h: No such file or directory
compilation terminated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/json-1.8.3 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/json-1.8.3/gem_make.out
If you want to install Ruby 2 (or greater) on Windows 7 (64 bit), you need to install DevKit 64 bit as well. Your Devkit has to be compatible with your operating system.
So, make sure you installed the correct Ruby and the compatible Devkit on your system.
See this tutorial for more information.
There was a group of gems which are dependent together. So, I had to install step by step.
As I did it based on error messages and one by one, I forgot to make a note about the steps.
I'm trying to install the puma gem, but when I run
gem install puma
I get this error message:
Temporarily enhancing PATH to include DevKit
Building native extensions. This could take a while...
ERROR: Error installing puma:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
creating Makefile
make
generating puma_http11-i386-mingw32.def
compiling http11_parser.c
ext/http11/http11_parser.rl: In function 'puma_parser_execute':
ext/http11/http11_parser.rl:111:3: warning: comparison between signed and unsigned integer expressions
compiling io_buffer.c
io_buffer.c: In function 'buf_to_str':
io_buffer.c:119:3: warning: pointer targets in passing argument 1 of 'rb_str_new' differ in signedness
c:/Ruby193/include/ruby-1.9.1/ruby/intern.h:653:7: note: expected 'const char *' but argument is of type 'uint8_t *'
compiling mini_ssl.c
In file included from mini_ssl.c:3:0:
c:/Ruby193/include/ruby-1.9.1/ruby/backward/rubyio.h:2:2: warning: #warning use "ruby/io.h" instead of "rubyio.h"
mini_ssl.c:4:25: fatal error: openssl/bio.h: No such file or directory
compilation terminated.
make: *** [mini_ssl.o] Error 1
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.6.0 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/puma-2.6.0/ext/puma_http11/gem_make.out
Adding gem 'puma' to my Gemfile and running bundle install isn't an option, because that just doesn't work with any gem and gives me an error message (which is a separate issue, one that I've circumvented with the other gems I've used by installing them via gem install).
Came across very same issue.
sudo apt-get install libssl-dev
fixed it for me.
I ran bundle update before bundle install and that solved the issue for me.
I'm not sure if that was the only thing that helped, as I manually updated puma before that, using these steps:
Checked which version of openssl Ruby is using by running ruby -v -ropenssl -e "puts OpenSSL::OPENSSL_VERSION"
Downloaded the right openssl version from
http://packages.openknapsack.org/openssl/openssl-1.0.0o-x86-windows.tar.lzma
(got the link from https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows and edited it based on the output of #1).
Extracted openssl using http://www.7-zip.org to C:\RailsInstaller\openssl
gem install puma -- --with-opt-dir=C:/RailsInstaller/openssl
Figured out the solution to the puma bundle. Followed directions from https://github.com/hicknhack-software/rails-disco/wiki/Installing-puma-on-windows
First you need to download:
DevKit compatible with your ruby version
OpenSSL Developer Package (contains header files and binaries)
And then:
Install DevKit, e.g. in c:\devkit
Unpack the OpenSSL Package, e.g. in c:\openssl (use 7Zip or PeaZip)
You need to copy the ddls from the bin directory (libeay32.dll and ssleay32.dll) to your ruby/bin directory.
Open a windows console
Initialize the DevKit build environment: c:\devkit\devkitvars.bat (except here, I used this in command prompt instead: ruby dk.rb init)
Now it’s possible to install the puma gem with the OpenSSL packages:
gem install puma -- --with-opt-dir=c:\openssl
I think you hit issue #430
https://github.com/puma/puma/issues/430
Re-installing Ruby might help you as well as it closed this issue on GitHub.