Just wondering if anyone experienced this been looking around online to fix it, haven't stumbled across anything just yet.
Installing json (1.7.6) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension .
C:/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9 .1/gems/json-1.7.6 for inspection. Results logged to C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/json-1.7. 6/ext/json/ext/generator/gem_make.out An error occured while installing json (1.7.6), and Bundler cannot continue. Make sure that gem install json -v '1.7.6' succeeds before bundling.
You need the Ruby DevKit witch provides the compiler to create the gem. You can get it here:
http://rubyinstaller.org/downloads/
Related
I've tried installing using as part of the bundle and using sudo, but I get the same error message every time. I'm currently on Ruby 2.0.0 and Rails 4.1.8. I'm not sure what is going on. The exact error message below:
Fetching gem metadata from https://rubygems.org/..........
Resolving dependencies...
Using rake 10.4.2 Using i18n 0.6.11
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r
./siteconf20141218-80226-brqexc.rb 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
extconf failed, exit code 1
Gem files will remain installed in
/Library/Ruby/Gems/2.0.0/gems/json-1.8.1 for inspection. Results
logged to
/Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/json-1.8.1/gem_make.out
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.
Any advice appreciated.
I've run into similar error on Ubuntu and all I needed to do was:
sudo apt-get install ruby-dev
For Mac, the following gist seems worth to have a look into: Setup mac for ruby dev
I am just getting started with ruby on rails, after installing rails executing many commands on the console, i tried to run rails server with the command rails server but gets an error about not loading coffee-rails, i tried the command gem install coffee-rails i got
gem install coffee-rails
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing coffee-rails:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe -r ./siteconf20140724-4244-v083ym.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/json-1.8.
1 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/extensions/x86-mingw32/1.9.1/js
on-1.8.1/gem_make.out
RubyGems 2.4.1 will not build native extensions in Ruby version 1.9.3 and earlier on Windows.
You will need to downgrade RubyGems to 1.8.29.
To do this run the following command:
gem update --system 1.8.29
Check gem version:
gem -v
1.8.29
Now try your command again:
gem install coffee-rails
ref: https://groups.google.com/forum/#!topic/rubyinstaller/k19SeJijpKU/discussion
Take a look at this answer - they seem to have had the same trouble and had to use an older version of make.
I'm just getting into ruby on rails, And I'm setting it up on a second windows computer.
I've used the most recent 'railsinstaller' using rails: 4.0.0 and ruby: 2.0.0p195
when I run rails new <project name> Rails creates the project but fails on the bundle step with the following error.
Installing atomic (1.1.14)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
D:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14 for inspection.
Results logged to D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14/ext/gem_make.out
An error occurred while installing atomic (1.1.14), and Bundler cannot continue.
Make sure that `gem install atomic -v '1.1.14'` succeeds before bundling.
I've tried a few things I've found on google such as updating gem and ruby but none of that worked... I'm too new to rails to figure this out myself, does anyone know what might be the problem?
EDIT
the outcome of gem install atomic -v '1.1.14'
D:\Programming\Ruby>gem install atomic -v '1.1.14'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ConEmu blocks ANSICON injection
The system cannot find the file D:\ansicon\ansicon-master\ansicon.exe.
ERROR: Error installing atomic:
ERROR: Failed to build gem native extension.
D:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb
creating Makefile
Gem files will remain installed in D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14 for inspection.
Results logged to D:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/atomic-1.1.14/ext/gem_make.out
Thanks,
Peter McKinney
Can't overcome problem. Everytime i generating new rails project on windows get the massage:
Installing json (1.6.5) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb
C:/Ruby193/bin/ruby.exe: No such file or directory -- extconf.rb (LoadError)
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6.5
for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/json-1.6.5/ext/json/ext/parser/gem_make.out
An error occured while installing json (1.6.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.5'` succeeds before bundling.
i've tried instal json but without lack... I've manage to instal json_pure. But still get this error. 'ruby dk.rb init' not worked too
For building native extensions on Windows, you need to install DevKit. It gives you a Unix-like environment and compilers.
I know, yet another question of the kind, but nothing helped so far.
When I run bundle install on the production server I get the following error:
...
Installing json (1.6.3) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
Gem files will remain installed in /home/onblimp/onblimp/releases/20111213131738/RAILS_ENV=production/ruby/1.9.1/gems/json-1.6.3 for inspection.
Results logged to /home/onblimp/onblimp/releases/20111213131738/RAILS_ENV=production/ruby/1.9.1/gems/json-1.6.3/ext/json/ext/parser/gem_make.out
An error occured while installing json (1.6.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.3'` succeeds before bundling.
When I run gem install json -v '1.6.3' it installs without error. I'm running both commands as a root. In development it works well. A few days ago it also worked well.
Any help is appreciated.
I've managed to solve this issue by simply restarting the server. It would be great to know the cause, but I guess that's too much to ask.
hey i got the same error .I installed xcode and restart my mac.Then i made new project in rails and got into this
**Errno::EPERM: Operation not permitted
An error occured while installing json (1.6.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.6.3'` succeeds before bundling**
i just did sudo gem install json -v '1.6.3' it worked fine in my case.