I am attempting to run bundle install on a github file for a tutorial about Rails testing. When I attempt to run
bundle install
It installs most of my gems and then gives me this very long error. I've attempted to update both xcode and homebrew and it hasn't helped. Any advice would be very appreciated!
Here is the error:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/json-1.7.6/ext/json/ext/generator
/Users/johnseabolt/.rbenv/versions/2.3.1/bin/ruby -r ./siteconf20170209-69149-18f1540.rb extconf.rb
creating Makefile
current directory: /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/json-1.7.6/ext/json/ext/generator
make "DESTDIR=" clean
current directory: /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/json-1.7.6/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
./../fbuffer/fbuffer.h:179:47: error: too few arguments provided to function-like macro invocation
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^
/Users/johnseabolt/.rbenv/versions/2.3.1/include/ruby-2.3.0/ruby/intern.h:797:9: note: macro 'rb_str_new' defined here
#define rb_str_new(str, len) __extension__ ( \
^
In file included from generator.c:1:
./../fbuffer/fbuffer.h:179:11: warning: incompatible pointer to integer conversion initializing 'VALUE' (aka 'unsigned
long') with an expression of type 'VALUE (const char *, long)' (aka 'unsigned long (const char *, long)')
[-Wint-conversion]
VALUE result = rb_str_new(FBUFFER_PAIR(fb));
^ ~~~~~~~~~~
1 warning and 1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/json-1.7.6 for
inspection.
Results logged to
/Users/johnseabolt/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-15/2.3.0-static/json-1.7.6/gem_make.out
An error occurred while installing json (1.7.6), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.6'` succeeds before bundling.
Johns-MacBook-Pro:expense_tracker johnseabolt$
Here is the gem file for the app I cloned from Github:
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
group :development, :test do
gem "rspec-rails", "~> 2.0"
end
group :test do
gem 'factory_girl_rails'
gem 'capybara'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'debugger'
尝试运行以下命令,然后运行捆绑软件安装
gem system --update
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.