I'm trying to use ruby+rails under windows cmd.exe, everything is now fine except bundle doesn't install one gem:
<...>
Using sass (3.2.11)
Using bootstrap-sass (2.3.1.3)
Using bootstrap-select-rails (1.3.0.1)
Installing bson (2.0.0.rc2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
C:/Ruby200-x64/bin/ruby.exe extconf.rb
creating Makefile
make "DESTDIR="
generating native-x64-mingw32.def
compiling native.c
native.c:17:23: fatal error: arpa/inet.h: No such file or directory
compilation terminated.
make: *** [native.o] Error 1
Gem files will remain installed in C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bson-
2.0.0.rc2 for inspection.
Results logged to C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/bson-2.0.0.rc2/ext/bso
n/gem_make.out
An error occurred while installing bson (2.0.0.rc2), and Bundler cannot
continue.
Make sure that `gem install bson -v '2.0.0.rc2'` succeeds before bundling.
What am I doing incorrect?
Related
I am using Cygwin to on my windows machine to use RVM and run my rails project. Now when I run bundle install it is showing the following message.
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /home/Shila/.rvm/gems/ruby-2.6.3/gems/sassc-2.2.1/ext
/home/Shila/.rvm/rubies/ruby-2.6.3/bin/ruby.exe -I /home/Shila/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0 -r ./siteconf20200414-4993-go8jx2.rb extconf.rb
creating Makefile
current directory: /home/Shila/.rvm/gems/ruby-2.6.3/gems/sassc-2.2.1/ext
make "DESTDIR=" clean
current directory: /home/Shila/.rvm/gems/ruby-2.6.3/gems/sassc-2.2.1/ext
make "DESTDIR="
compiling ./libsass/src/ast.cpp
CC: fatal error: cannot execute ‘cc1plus’: spawn: No such file or directory
compilation terminated.
make: *** [Makefile:236: ast.o] Error 1
make failed, exit code 2
Gem files will remain installed in /home/Shila/.rvm/gems/ruby-2.6.3/gems/sassc-2.2.1 for inspection.
Results logged to /home/Shila/.rvm/gems/ruby-2.6.3/extensions/x86_64-cygwin/2.6.0/sassc-2.2.1/gem_make.out
An error occurred while installing sassc (2.2.1), and Bundler cannot continue.
Make sure that `gem install sassc -v '2.2.1' --source 'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
sass-rails was resolved to 6.0.0, which depends on
sassc-rails was resolved to 2.1.2, which depends on
sassc
ruby version is 2.6.3
Bundler version 1.17.3
I had to add new gcc-g++ and libgccpp1
I am getting an error like:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/oj-3.1.3/ext/oj
C:/Ruby23-x64/bin/ruby.exe -r ./siteconf20170616-5396-19dncaf.rb extconf.rb
Creating Makefile for ruby version 2.3.0 on x64-mingw32
creating Makefile
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/oj-3.1.3/ext/oj
make "DESTDIR=" clean
current directory: C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/oj-3.1.3/ext/oj
make "DESTDIR="
generating oj-x64-mingw32.def
compiling cache8.c
make: x86_64-w64-mingw32-gcc: Command not found
make: *** [cache8.o] Error 127
make failed, exit code 2
Gem files will remain installed in
C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/oj-3.1.3 for inspection.
Results logged to
C:/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/oj-3.1.3/gem_make
.out
An error occurred while installing oj (3.1.3), and Bundler cannot continue.
Make sure that `gem install oj -v '3.1.3'` succeeds before bundling.
In Gemfile:
oj
Ruby version -2.3.0
Rails version -4.2.3
windows 7
Trying my hand at Ruby on Rails. Sorry if this is a little rudimentary. I am trying to understand why this is happening. If you can help, thanks a ton!
I am trying to create a project for Rails
in cmd line I input:
C:\Users\Player 1\Sites>rails new simple_cms -d mysql
I get the error at this point:
Installing binding_of_caller 0.7.2 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20151020-6164-22d8zu.rb extconf.rb
creating Makefile
make clean
Makefile:165: *** target pattern contains no `%'. Stop.
make
Makefile:165: *** target pattern contains no `%'. Stop.
make failed, exit code 2
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/binding_of_caller-0.7.2 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/binding_of_caller-0.7.2/gem_make.out
An error occurred while installing binding_of_caller (0.7.2), and Bundler cannot
continue.
Make sure that gem install binding_of_caller -v '0.7.2' succeeds before
bundling.
Here are my program versions:
Ruby 2.2.2p95
Rails 4.2.3
Installing byebug 5.0.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
C:/Ruby22-x64/bin/ruby.exe -r ./siteconf20150719-7912-f08j1k.rb extconf.rb
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
generating byebug-x64-mingw32.def
compiling breakpoint.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 ./byebug.h:4,
from breakpoint.c:1:
c:/Ruby22-x64/include/ruby-2.2.0/ruby/defines.h:65:22: fatal error: setjmpex.h: No such file or directory
compilation terminated.
make: *** [breakpoint.o] Error 1
make failed, exit code 2
Gem files will remain installed in C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/byebug-5.0.0 for inspection.
Results logged to C:/Ruby22-x64/lib/ruby/gems/2.2.0/extensions/x64-mingw32/2.2.0/byebug-5.0.0/gem_make.out
An error occurred while installing byebug (5.0.0), and Bundler cannot continue.
Make sure that `gem install byebug -v '5.0.0'` succeeds before bundling.
I'm using Rails 3.2 and ruby 1.9.2. I've added gem 'fcgi' (fastcgi) to my Gemfile, but when I run bundle install it fails on the fcgi.
output:
Installing fcgi (0.9.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
make
make: *** No targets. Stop.
Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi- 0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.
Installing fcgi (0.9.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
make
make: *** No targets. Stop.
Gem files will remain installed in /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/gems/ruby-1.9.2-p318/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
An error occured while installing fcgi (0.9.1), and Bundler cannot continue.
Make sure that `gem install fcgi -v '0.9.1'` succeeds before bundling.
Then, I ran the gem install as suggested:
johns-MacBook-Pro:drywall johndcowan$ sudo gem install fcgi -v '0.9.1'
Fetching: fcgi-0.9.1.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing fcgi:
ERROR: Failed to build gem native extension.
/Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/bin/ruby extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
make
make: *** No targets. Stop.
Gem files will remain installed in /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1 for inspection.
Results logged to /Users/johndcowan/.rvm/rubies/ruby-1.9.2-p318/lib/ruby/gems/1.9.1/gems/fcgi-0.9.1/ext/fcgi/gem_make.out
johns-MacBook-Pro:drywall johndcowan$
I found a user with the same problem and he/she installed fcgi_devel using yum which solved his/her problem with fcgi. I tried instaling using port but it won't work. The same site said I do not need yum.
sudo port install fcgi-devel
Error: Port fcgi-devel not found
Any ideas?
If using Homebrew, try brew install fastcgi first.