Getting error while installing ffi gem - ruby

$ jruby -S bundle update
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from http://controller.c3.mtv:8008/....
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from http://controller.c3.mtv:8008/..
Resolving dependencies...
Using rake (10.1.0)
Using ansi (1.4.3)
Using builder (3.2.2)
Installing ffi (1.9.2)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
c:/jruby-1.7.4/bin/jruby.exe extconf.rb
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-
1.9.2 for inspection.
Results logged to c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-1.9.2/ext/ffi_c/g
em_make.out
An error occurred while installing ffi (1.9.2), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.2'` succeeds before bundling.
This was the error when i did a bundle update so i did the following as suggested above in last line
$ gem install ffi -v '1.9.2'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
c:/jruby-1.7.4/bin/jruby.exe extconf.rb
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-
1.9.2 for inspection.
Results logged to c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-1.9.2/ext/ffi_c/g
em_make.out
Then i tried the following
$ gem install ffi
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
c:/jruby-1.7.4/bin/jruby.exe extconf.rb
make
'make' is not recognized as an internal or external command,
operable program or batch file.
Gem files will remain installed in c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-
1.9.2 for inspection.
Results logged to c:/jruby-1.7.4/lib/ruby/gems/shared/gems/ffi-1.9.2/ext/ffi_c/g
em_make.out

'make' is not recognized as an internal or external command, operable
program or batch file.
Looks like a Windows error message..do you have make installed on your system? I'd check out Cygwin to avoid getting dependency issues on unix tools.

Related

Error while bundle install windows 10

I have windows 10 and the terminal installed, and when I try and run bundle install I get this output:
Kalden#DESKTOP-KK2V578:/mnt/c/Users/Kalden/Desktop/ktane_voice-master$ bundle
The git source `git://github.com/watsonbox/pocketsphinx-ruby.git` uses the `git` protocol, which transmits data without encryption. Disable this warning with `bundle config git.allow_insecure true`, or switch to the `https` protocol to keep your data secure.
Fetching gem metadata from https://rubygems.org/.........
Using bundler 1.16.1
Using coderay 1.1.1
Using espeak-ruby 1.0.2
Fetching ffi 1.9.10
Installing ffi 1.9.10 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180226-330-1hgm5yc.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in
/mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/gems/ffi-1.9.10 for inspection.
Results logged to
/mnt/c/Users/Kalden/Desktop/ktane_voice-master/vendor/bundle/ruby/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.10/gem_make.out
An error occurred while installing ffi (1.9.10), and Bundler cannot continue.
Make sure that `gem install ffi -v '1.9.10'` succeeds before bundling.
In Gemfile:
pocketsphinx-ruby was resolved to 0.3.0, which depends on
ffi
Kalden#DESKTOP-KK2V578:/mnt/c/Users/Kalden/Desktop/ktane_voice-master$ sudo gem install ffi -v '1.9.10'
Building native extensions. This could take a while...
ERROR: Error installing ffi:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/ffi-1.9.10/ext/ffi_c
/usr/bin/ruby2.3 -r ./siteconf20180226-376-15d5pse.rb extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
extconf failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/ffi-1.9.10 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/ffi-1.9.10/gem_make.out

Error while trying to install zsteg

While trying to install zsteg on Ubuntu I encounter the following error:
$ sudo gem install zsteg
Building native extensions. This could take a while...
ERROR: Error installing zsteg:
ERROR: Failed to build gem native extension.
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 mkrf_conf.rb
current directory: /var/lib/gems/2.3.0/gems/rainbow-2.2.2/ext
/usr/bin/ruby2.3 -rubygems /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake RUBYARCHDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2 RUBYLIBDIR=/var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2
/usr/bin/ruby2.3: No such file or directory -- /usr/share/rubygems-integration/all/gems/rake-10.5.0/bin/rake (LoadError)
rake failed, exit code 1
Gem files will remain installed in /var/lib/gems/2.3.0/gems/rainbow-2.2.2 for inspection.
Results logged to /var/lib/gems/2.3.0/extensions/x86_64-linux/2.3.0/rainbow-2.2.2/gem_make.out
ruby2.3, ruby-sec and rake are installed
and also tried:
gem update --system
Please help.

Ruby: Having correct DevKit and Ruby version - Failed to build gem native extension

I installed 1.9.3 ruby from http://dl.bintray.com/oneclick/rubyinstaller/rubyinstaller-1.9.3-p448.exe to C:\Ruby193.
I downloaded https://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe to C:\ruby_dev_kit and from there ran ruby dk.rb init then ruby dk.rb install
It all installed successfully.
Then when I ran gem install json I keep getting
Installing json (1.4.6) The system cannot find the path specified.
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
checking for ruby/re.h... yes
checking for ruby/encoding.h... yes
creating Makefile
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.4.
6 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.4.6/ext/json/ext/ge
nerator/gem_make.out
An error occurred while installing json (1.4.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.4.6'` succeeds before bundling.
I also tried gem install json --platform=ruby
Doesn't change anything. It seems that there's c compiler issues but I path defined correctly and DevKit associated as well.
Tried uninstall and install, doesn't help. Any thoughts?

Problems installing gems with RubyGems

I'm using Debian 5
Ruby version 1.8.7
Rubygems version 2.0.3
Rails version 3.2.12
I made my Ruby on Rails app and want to deploy it publicly, so I tried to install "Mongrel" without any luck and then "Unicorn" also without any luck and same error.
vps1198019:~# gem install mongrel
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/ext/http11/gem_make.out
and
vps1198019:~# gem install unicorn
Building native extensions. This could take a while...
ERROR: Error installing unicorn:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/kgio-2.8.0/ext/kgio/gem_make.out
Try using below command. Because of version mismatch, gem is not installed.
$ gem install mongrel --pre
So I found a solution for my problem by installed it more manually. I downloaded Unicorn from http://rubyforge.org/frs/?group_id=1306 (.gem file). Stored it in server. Went to that folder with terminal. Then I accessed it with
gem install --local unicorn.gem
Then it prompted that I must have kgio and raindrops so I installed them:
gem install kgio
gem install raindrops
and repeated first command.

bson_ext fails on ubuntu

I have installed all the dependencies for pophealth:
"https://github.com/pophealth/popHealth/wiki/Installation"
but when I run Bundle Install I receive the following error:
Gem:Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in 'require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem Files will remain installed in /home/pophealth/.bundler/tmp/3335/gems/bson_ext-1.5.1 for inspection
results logged to /home/pophealth/.bundler/tmp/3335/gems/bson_ext-1.5.1/ext/cbson/gem_make.out
An error occurred while installing bson_ext (1.5.1), and bundler cannot continue.
Make sure that 'gem install bson_ext -v '1.5.1'' succeeds before bundling.
when I run gem install bson_ext -v '1.5.1' i receive the following error

Resources