fastlane-community/fastlane-plugin-slack_train

Problem with json -v '2.0.3'

Lukaz32 opened this issue · 4 comments

I'm getting the following error on installing the plugin:

Installing plugin dependencies...
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /usr/local/lib/fastlane_lib/bundle/lib/ruby/gems/2.2.0/gems/json-2.0.3/ext/json/ext/generator
/usr/local/lib/fastlane_lib/bundle/bin/ruby -r ./siteconf20170310-93625-1s8si68.rb extconf.rb
creating Makefile

current directory: /usr/local/lib/fastlane_lib/bundle/lib/ruby/gems/2.2.0/gems/json-2.0.3/ext/json/ext/generator
make "DESTDIR=" clean

current directory: /usr/local/lib/fastlane_lib/bundle/lib/ruby/gems/2.2.0/gems/json-2.0.3/ext/json/ext/generator
make "DESTDIR="
compiling generator.c
clang: warning: no such sysroot directory:
'/Applications/Xcode-7.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk'
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /usr/local/lib/fastlane_lib/bundle/include/ruby-2.2.0/ruby.h:33:
In file included from /usr/local/lib/fastlane_lib/bundle/include/ruby-2.2.0/ruby/ruby.h:29:
/usr/local/lib/fastlane_lib/bundle/include/ruby-2.2.0/ruby/defines.h:26:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/fastlane_lib/bundle/lib/ruby/gems/2.2.0/gems/json-2.0.3 for inspection.
Results logged to /usr/local/lib/fastlane_lib/bundle/lib/ruby/gems/2.2.0/extensions/x86_64-darwin-15/2.2.0-static/json-2.0.3/gem_make.out

An error occurred while installing json (2.0.3), and Bundler cannot continue.
Make sure that `gem install json -v '2.0.3'` succeeds before bundling.

I've tried manually sudo gem install json -v '2.0.3'
And it gives me:

Building native extensions.  This could take a while...
Successfully installed json-2.0.3
Parsing documentation for json-2.0.3
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/json/ext/generator.bundle, skipping
unable to convert "\xCA" from ASCII-8BIT to UTF-8 for lib/json/ext/parser.bundle, skipping
1 gem installed

Still I can't add the plugin :/

What am I missing?

How did you install fastlane? Can you share your Gemfile?

I believe it was via sudo gem install fastlane -NV

This is my Gemfile

# Autogenerated by fastlane
#
# Ensure this file is checked in to source control!

source "https://rubygems.org"

gem 'fastlane'

plugins_path = File.join(File.dirname(__FILE__), 'fastlane', 'Pluginfile')
eval_gemfile(plugins_path) if File.exist?(plugins_path)
~                                                                                                                                                                                                                                   
~                                                                                                                       
~                                                                                                                       
"Gemfile" 10L, 261C

can you run sudo gem uninstall fastlane, and then run bundle install?

That did it! Thanks man :)