I am trying to install ruby but everytime sudo bundle --without production the installation crash when it comes to therubyracer:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for main() in -lobjc... yes
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/therubyracer-0.9.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/therubyracer-0.9.10/ext/v8/gem_make.out
An error occurred while installing therubyracer (0.9.10), and Bundler cannot continue.
Make sure that `gem install therubyracer -v '0.9.10'` succeeds before bundling.
Is there any way to make this work?
Thanks
Related
I am trying to install this ope-rb gem in my project. Here, the native.c is the gem source program it seems. Since it couldn't find the openssl/rand.h header file, it throws an error. Can anyone tell me what am I missing?
Fetching ope-rb 0.0.1
Installing ope-rb 0.0.1 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/matheswka/.rvm/rubies/ruby-2.2.0/bin/ruby -r ./siteconf20180821-27089-1aspxw9.rb extconf.rb
checking for openssl/ssl.h... no
checking for SSLv23_method() in -lssl... yes
creating Makefile
make "DESTDIR=" clean
make "DESTDIR="
compiling native.c
native.c:3:10: fatal error: 'openssl/rand.h' file not found
#include <openssl/rand.h>
^~~~~~~~~~~~~~~~
1 error generated.
make: *** [native.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/matheswka/.rvm/gems/ruby-2.2.0#appointments/gems/ope-rb-0.0.1 for inspection.
Results logged to /Users/matheswka/.rvm/gems/ruby-2.2.0#appointments/extensions/x86_64-darwin-14/2.2.0-static/ope-rb-0.0.1/gem_make.out
An error occurred while installing ope-rb (0.0.1), and Bundler cannot continue.
Make sure that `gem install ope-rb -v '0.0.1'` succeeds before bundling.
I am trying to install charlock_holmes gem on centos but i keep on getting
Installing charlock_holmes 0.7.6 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/usr/local/rvm/gems/ruby-2.2.5/gems/charlock_holmes-
0.7.6/ext/charlock_holmes
/usr/local/rvm/rubies/ruby-2.2.5/bin/ruby -r ./siteconf20180607-1811-
1cbsady.rb
extconf.rb --with-icu-dir=C:UsersmadprogDesktopicusourcesdistusrlocal
--with-icui18nlib=icuin --with-icudatalib=icudt
checking for main() in -licuin... no
which: no brew in
(/usr/local/rvm/gems/ruby-2.2.5/bin:/usr/local/rvm/gems/ruby-
2.2.5#global/bin:/usr/local/rvm/rubies/ruby-
2.2.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/usr/local/
rvm/bin:/root/bin)
checking for main() in -licuin... no
***** icu required (brew install icu4c or apt-get install libicu-dev)
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You
may need configuration options.
To see why this extension failed to compile, please check the mkmf.log which
can be found here:
/usr/local/rvm/gems/ruby-2.2.5/extensions/x86_64-
linux/2.2.0/charlock_holmes-0.7.6/mkmf.log
extconf failed, exit code 1
An error occurred while installing charlock_holmes (0.7.6), and Bundler
cannot continue.
In Gemfile:
copyright-header was resolved to 1.0.22, which depends on
github-linguist was resolved to 6.2.0, which depends on
charlock_holmes
i also tried installing libicu-dev and this is what i get
no package libicu-dev available.
Error : nothing to do
please help, thank you.
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
Why is it so hard to get Ruby on Rails to work on a Mac? On Windows it is so easy but on my Mac, which I am now forced to use, it just doesn't want to play ball!
I cd into the project directory and run:
rails server
The the Terminal says:
You have requested:
sqlite3 >= 0
The bundle currently has sqlite3 locked at 1.3.10.
Try running `bundle update sqlite3`
Run `bundle install` to install missing gems.
So I run bundle update sqlite3 but then get:
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
...
An error occurred while installing debugger (1.6.8), and Bundler cannot
continue.
Make sure that `gem install debugger -v '1.6.8'` succeeds before bundling.
I then run gem install debugger -v '1.6.8'
Building native extensions. This could take a while...
ERROR: Error installing debugger:
ERROR: Failed to build gem native extension.
/Users/me/.rbenv/versions/2.1.5/bin/ruby extconf.rb
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
You didn't share the logs, but I suggest you to check/install Xcode command line tools, which you can do with:
xcode-select --install
Or by opening Xcode and installing them using GUI.
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.