I have been trying and trying and I can't get past this error. I have Ruby version 1.8.7 and Gem version 2.1.11 and I am trying to install open project and I keep coming up with this error
Installing json (1.8.1)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/json-1.8.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
Any help will be appreciated...
Best,
Mike
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that gem install json -v '1.8.1' succeeds before bundling.
==> Something went wrong :(
==> Installation aborted.
Running sudo gem install json worked for me. Note: running gem install json did not work.
Related
I'm new to Ruby and I'm just trying to run a script. Firstly, when I try to bundle install it says:
Daniels-Air:Documents Daniel$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Rubygems 2.0.3 is not threadsafe, so your gems will be installed one at a time. Upgrade to Rubygems 2.1.0 or higher to enable parallel gem installation.
Installing ffi 1.9.10 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
Gem files will remain installed in /var/folders/_r/8pxmrph95fj0km8h7sfkw9f40000gn/T/bundler20151216-21689-8jiqebffi-1.9.10/gems/ffi-1.9.10 for inspection.
Results logged to /var/folders/_r/8pxmrph95fj0km8h7sfkw9f40000gn/T/bundler20151216-21689-8jiqebffi-1.9.10/gems/ffi-1.9.10/ext/ffi_c/gem_make.out
Using multipart-post 2.0.0
Installing json 1.8.3 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h
Gem files will remain installed in /var/folders/_r/8pxmrph95fj0km8h7sfkw9f40000gn/T/bundler20151216-21689-5mz4k9json-1.8.3/gems/json-1.8.3 for inspection.
Results logged to /var/folders/_r/8pxmrph95fj0km8h7sfkw9f40000gn/T/bundler20151216-21689-5mz4k9json-1.8.3/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
Using multi_json 1.11.2
Using rubyzip 1.1.7
Using websocket 1.2.2
Using bundler 1.11.1
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.
When I then try to execute the file anyway I come across the problem:
Could not find gem 'faraday' in any of the gem sources listed in your Gemfile or available on this machine.
Run `bundle install` to install missing gems.
Where do I get this 'faraday' gem from? Should it have come with the code I am trying to run, or should I update something? Sorry if I got some terminology wrong, I'm very new to Ruby.
I've just realised all I needed to do was install the gem. Its made clear from the RubyGems.org library. Just typed:
sudo gem install faraday
to the terminal
I am beginner in ruby and wanted to install and GUI toolkit. So i surfed web and found shoes was one toolkit so i downloaded the ".install" file it didn't work saying some permission error, then i downloaded the older version which was ".run" format and that too didn't work so i found a gem of shoes when i try to download i get the below in ruby. i downloaded this shoes from git and still facing some error.
root#Drona:/home/naren/shoes4# gem install bundler && bundle install
Successfully installed bundler-1.10.5
1 gem installed
Installing ri documentation for bundler-1.10.5...
Installing RDoc documentation for bundler-1.10.5...
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all
non-root users on this machine.
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies....
Using rake 10.4.2
Using addressable 2.3.8
Using after_do 0.3.1
Using ast 2.0.0
Using parser 2.2.2.6
Using astrolabe 1.3.0
Using benchmark-ips 2.2.0
Using bouncy-castle-java 1.5.0147
Using docile 1.1.5
Installing json 1.8.3 with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from extconf.rb:1:in `<main>'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.3 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
the above is the terminal output.
Ruby version installed is :
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
someone help we out with this installation
and if i have done anything wrong in installation of shoes then let me know
From your terminal directory it seems like you are trying to install shoes4 on ruby 1.9.3. To install shoes4 you need JRuby and a JDK - please follow the instructions in the readme
Shoes 3 can't be installed through gem install due to the way it was built. For Shoes 3 you need the install script, I recommend the appropriate Shoes 3.2 version from this page. If this fails with some error please let us know the error so we can help :)
You should use the gem program to install shoes. If on your command line you type gem install shoes you should be fine.
to use it in an app, you would need to create a Gemfile and run Bundle install within your folder
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?
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.
Installing SystemTimer (1.2.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/SystemTimer-1.2.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/SystemTimer-1.2.1/ext/system_timer/gem_make.out
An error occured while installing SystemTimer (1.2.1), and Bundler cannot continue.
Make sure that `gem install SystemTimer -v '1.2.1'` succeeds before bundling.
I saw this post but mysql isn't the issue here (or is it? I do have -devel installed).
This is on a Fedora server, installing Diaspora. I have installed it before, but migrated to a new server. The other one was CentOS, not that it matters at the moment.
Not really sure where to start. I did try a yum list *timer* to see if there was anything along the same lines I needed to install.
Thanks!