Impossible de configurer l'environnement de développement car cppjieba_rb échoue à s'installer

Hi,

I am attempting to setup a development enviroment for Discourse.

When running bundle install based on the instructions at Install Discourse on macOS for development I get an error.

An error occurred while installing cppjieba_rb (0.3.0), and Bundler
cannot continue.
Make sure that `gem install cppjieba_rb -v '0.3.0' --source
'https://rubygems.org/'` succeeds before bundling.

I follow the suggestion and get the following output

$ gem install cppjieba_rb -v '0.3.0' --source
ERROR:  While executing gem ... (OptionParser::MissingArgument)
    missing argument: --source

What am I doing wrong and how can I fix the issue?

Can you try the docker based dev env, it is way simpler

I just checked my system and realized some dependencies and the ruby version manager thing needed to be configured . That might be while bundler is installing.

That said Docker does sound simpler, I intend to submit pull requests to Discourse, is the Docker environment still right for me? If so could you link me to information on it? Thanks :heart:

Yes it is perfect for that, search for docker development environment, there is a howto

The only thing I could find was (Superseded) Set up Docker in Virtualbox for 'production' testing which looks terribly outdated considering it’s use of Ubuntu 13. Could you link me to exactly the thread you’re talking about?

Sam’s talking about this one: Install Discourse for development using Docker

Thanks, and turns out - since I tried to install while on system Ruby rather than the correct version, future bundle installs were trying to use system rather than correct bundler. Deleting discourse and recloning solved the issue.


And I can now start making changes and creating new bugs :smiley:

Im getting the same error. I am running ubuntu on vagrant. Any know how to get passed this? @sam

Vagrant is not a supported dev environment, please follow one of the supported Developer Environment guides:

Je rencontre également ce problème. C’est plutôt triste de voir à quel point il est difficile de mettre en place un environnement Discourse local pour tester ce logiciel.

Quel problème ? Pourriez-vous être plus précis ?

Je n’arrive pas à configurer correctement l’environnement à cause de la bibliothèque cppjieba_rb.

J’ai essayé de corriger le problème avec : sudo gem install cppjieba_rb -v '0.3.3' --source 'https://rubygems.org/'

Voici la sortie obtenue :

ERREUR : Erreur lors de l'installation de cppjieba_rb :
	ERREUR : Échec de la construction de l'extension native du gem.

    répertoire actuel : /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20200402-46278-1lzwumr.rb extconf.rb
création du Makefile

    répertoire actuel : /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR=" clean

    répertoire actuel : /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR="
compilation de cppjieba_rb.c
compilation de internal.cc
Fichier inclus dans internal.cc : 1 :
Fichier inclus dans /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h : 33 :
Fichier inclus dans /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h : 24 :
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:413:31 : erreur : suffixe invalide sur le littéral ; C++11 exige un espace entre le littéral et l'identifiant [-Wreserved-user-defined-literal]
#define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
                              ^
                               
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:35 : erreur : suffixe invalide sur le littéral ; C++11 exige un espace entre le littéral et l'identifiant [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
                                  ^
                                   
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:55 : erreur : suffixe invalide sur le littéral ; C++11 exige un espace entre le littéral et l'identifiant [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
                                                      ^
                                                       
Fichier inclus dans internal.cc : 1 :
Fichier inclus dans /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h : 33 :
Fichier inclus dans /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h : 2111 :
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:19 : avertissement : le spécificateur de classe de stockage 'register' est déprécié et incompatible avec C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:36 : avertissement : le spécificateur de classe de stockage 'register' est déprécié et incompatible avec C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
Fichier inclus dans internal.cc : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp : 4 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp : 13 :
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:87:70 : avertissement : 'ptr_fun<unsigned int, bool>' est déprécié [-Wdeprecated-declarations]
  s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
                                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1097:1 : note : 'ptr_fun<unsigned int, bool>' a été explicitement marqué comme déprécié ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39 : note : expansion du macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48 : note : expansion du macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Fichier inclus dans internal.cc : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp : 4 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp : 13 :
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:92:61 : avertissement : 'ptr_fun<unsigned int, bool>' est déprécié [-Wdeprecated-declarations]
  s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end());
                                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1097:1 : note : 'ptr_fun<unsigned int, bool>' a été explicitement marqué comme déprécié ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39 : note : expansion du macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48 : note : expansion du macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Fichier inclus dans internal.cc : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp : 4 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp : 13 :
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:101:70 : avertissement : 'bind2nd<std::__1::equal_to<char>, char>' est déprécié [-Wdeprecated-declarations]
  s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to<char>(), x))));
                                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1079:1 : note : 'bind2nd<std::__1::equal_to<char>, char>' a été explicitement marqué comme déprécié ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39 : note : expansion du macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48 : note : expansion du macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Fichier inclus dans internal.cc : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp : 4 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp : 8 :
Fichier inclus dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp : 13 :
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:106:61 : avertissement : 'bind2nd<std::__1::equal_to<char>, char>' est déprécié [-Wdeprecated-declarations]
  s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to<char>(), x))).base(), s.end());
                                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1079:1 : note : 'bind2nd<std::__1::equal_to<char>, char>' a été explicitement marqué comme déprécié ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1101:39 : note : expansion du macro '_LIBCPP_DEPRECATED_IN_CXX11'
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1090:48 : note : expansion du macro '_LIBCPP_DEPRECATED'
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
6 avertissements et 3 erreurs générés.
make : *** [internal.o] Erreur 1

make a échoué, code de sortie 2

Bon, vous avez exécuté le script, cloné le dépôt, et cela plante pendant bundle install ?

Quelle version de macOS utilisez-vous ?

Pour information : J’ai le même problème sur MacOS :

$ bundle install
Récupération des métadonnées de gem depuis https://rubygems.org/.........
Utilisation de rake 13.0.1
Utilisation de concurrent-ruby 1.1.6
Utilisation de i18n 1.8.2
Utilisation de minitest 5.14.0
Utilisation de thread_safe 0.3.6
Utilisation de tzinfo 1.2.7
Utilisation de zeitwerk 2.3.0
Utilisation de activesupport 6.0.1
Utilisation de builder 3.2.4
Utilisation de erubi 1.9.0
Utilisation de mini_portile2 2.4.0
Utilisation de nokogiri 1.10.9
Utilisation de rails-dom-testing 2.0.3
Utilisation de crass 1.0.6
Utilisation de loofah 2.5.0
Utilisation de rails-html-sanitizer 1.3.0
Utilisation de actionview 6.0.1
Utilisation de rack 2.0.8
Utilisation de rack-test 1.1.0
Utilisation de actionpack 6.0.1
Utilisation de globalid 0.4.2
Utilisation de activejob 6.0.1
Utilisation de mini_mime 1.0.2
Utilisation de mail 2.7.1
Utilisation de actionmailer 6.0.1
Utilisation de actionview_precompiler 0.2.2
Utilisation de activemodel 6.0.1
Utilisation de active_model_serializers 0.8.4
Utilisation de activerecord 6.0.1
Utilisation de public_suffix 4.0.4
Utilisation de addressable 2.7.0
Utilisation de annotate 3.1.1
Utilisation de ast 2.4.0
Utilisation de aws-eventstream 1.0.3
Utilisation de aws-partitions 1.294.0
Utilisation de aws-sigv4 1.1.1
Utilisation de jmespath 1.4.0
Utilisation de aws-sdk-core 3.92.0
Utilisation de aws-sdk-kms 1.30.0
Utilisation de aws-sdk-s3 1.61.2
Utilisation de aws-sdk-sns 1.22.0
Utilisation de ember-source 2.18.2
Utilisation de execjs 2.7.0
Utilisation de barber 0.12.2
Utilisation de coderay 1.1.2
Utilisation de better_errors 2.6.0
Utilisation de debug_inspector 0.0.3
Utilisation de binding_of_caller 0.8.0
Utilisation de msgpack 1.3.3
Utilisation de bootsnap 1.4.6
Utilisation de uniform_notifier 1.13.0
Utilisation de bullet 6.1.0
Utilisation de bundler 2.1.4
Utilisation de byebug 11.1.1
Utilisation de cbor 0.5.9.6
Utilisation de certified 1.0.0
Utilisation de chunky_png 1.3.11
Utilisation de colored2 3.1.2
Utilisation de connection_pool 2.2.2
Utilisation de openssl-signature_algorithm 0.4.0
Utilisation de cose 1.0.0
Récupération de cppjieba_rb 0.3.3
Installation de cppjieba_rb 0.3.3 avec des extensions natives
Gem::Ext::BuildError : ERREUR : Échec de la création de l'extension native de la gem.

    répertoire actuel : /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /Library/Ruby/Site/2.6.0 -r ./siteconf20200407-43449-1j9kfa1.rb extconf.rb
Création du Makefile

répertoire actuel : /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR=" clean

répertoire actuel : /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb
make "DESTDIR="
Compilation de cppjieba_rb.c
Compilation de internal.cc
Dans le fichier inclus depuis internal.cc:1:
Dans le fichier inclus depuis
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
Dans le fichier inclus depuis
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:24:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:413:31:
erreur : suffixe invalide sur le littéral ; C++11 nécessite un espace entre le littéral et l'identifiant [-Wreserved-user-defined-literal]
#define RUBY_ARCH "universal-"RUBY_PLATFORM_OS
                              ^
                               
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:35:
erreur : suffixe invalide sur le littéral ; C++11 nécessite un espace entre le littéral et l'identifiant [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
                                  ^
                                   
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/universal-darwin19/ruby/config.h:414:55:
erreur : suffixe invalide sur le littéral ; C++11 nécessite un espace entre le littéral et l'identifiant [-Wreserved-user-defined-literal]
#define RUBY_PLATFORM "universal."RUBY_PLATFORM_CPU"-"RUBY_PLATFORM_OS
                                                      ^
                                                       
Dans le fichier inclus depuis internal.cc:1:
Dans le fichier inclus depuis
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby.h:33:
Dans le fichier inclus depuis
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/ruby.h:2111:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:19:
avertissement : le spécificateur de stockage « register » est obsolète et incompatible avec C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                  ^~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/include/ruby-2.6.0/ruby/intern.h:56:36:
avertissement : le spécificateur de stockage « register » est obsolète et incompatible avec C++17 [-Wdeprecated-register]
void rb_mem_clear(register VALUE*, register long);
                                   ^~~~~~~~~
Dans le fichier inclus depuis internal.cc:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:87:70: avertissement : « ptr_fun<unsigned int, bool> » est obsolète
[-Wdeprecated-declarations]
  s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
                                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1100:1: note : « ptr_fun<unsigned int, bool> » a été explicitement
marqué comme obsolète ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1054:39: note : développé à partir du macro « _LIBCPP_DEPRECATED_IN_CXX11 »
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1043:48: note : développé à partir du macro « _LIBCPP_DEPRECATED »
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Dans le fichier inclus depuis internal.cc:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:92:61: avertissement : « ptr_fun<unsigned int, bool> » est obsolète
[-Wdeprecated-declarations]
  s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end());
                                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1100:1: note : « ptr_fun<unsigned int, bool> » a été explicitement
marqué comme obsolète ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1054:39: note : développé à partir du macro « _LIBCPP_DEPRECATED_IN_CXX11 »
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1043:48: note : développé à partir du macro « _LIBCPP_DEPRECATED »
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Dans le fichier inclus depuis internal.cc:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:101:70: avertissement : « bind2nd<std::__1::equal_to<char>, char> » est obsolète
[-Wdeprecated-declarations]
  s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to<char>(), x))));
                                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1082:1: note : « bind2nd<std::__1::equal_to<char>, char> » a été
explicitement marqué comme obsolète ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1054:39: note : développé à partir du macro « _LIBCPP_DEPRECATED_IN_CXX11 »
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1043:48: note : développé à partir du macro « _LIBCPP_DEPRECATED »
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
Dans le fichier inclus depuis internal.cc:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/Jieba.hpp:4:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/QuerySegment.hpp:8:
Dans le fichier inclus depuis /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/include/cppjieba/DictTrie.hpp:13:
/Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3/ext/cppjieba_rb/../cppjieba/deps/limonp/StringUtil.hpp:106:61: avertissement : « bind2nd<std::__1::equal_to<char>, char> » est obsolète
[-Wdeprecated-declarations]
  s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to<char>(), x))).base(), s.end());
                                                            ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1082:1: note : « bind2nd<std::__1::equal_to<char>, char> » a été
explicitement marqué comme obsolète ici
_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1054:39: note : développé à partir du macro « _LIBCPP_DEPRECATED_IN_CXX11 »
#  define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
                                      ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/__config:1043:48: note : développé à partir du macro « _LIBCPP_DEPRECATED »
#    define _LIBCPP_DEPRECATED __attribute__ ((deprecated))
                                               ^
6 avertissements et 3 erreurs générés.
make : *** [internal.o] Erreur 1

make a échoué, code de sortie 2

Les fichiers de la gem resteront installés dans /Library/Ruby/Gems/2.6.0/gems/cppjieba_rb-0.3.3 pour inspection.
Les résultats sont consignés dans /Library/Ruby/Gems/2.6.0/extensions/universal-darwin-19/2.6.0/cppjieba_rb-0.3.3/gem_make.out

Une erreur s'est produite lors de l'installation de cppjieba_rb (0.3.3), et Bundler ne peut pas continuer.
Assurez-vous que `gem install cppjieba_rb -v '0.3.3' --source 'https://rubygems.org/'` réussit avant d'utiliser bundler.

Dans Gemfile:
  cppjieba_rb

Pour information : Informations sur la version de Xcode :

Le Dieu Google n’a fourni aucune solution ni aucun résultat. Il y avait un problème GitHub tangentiel qui suggérait :

Essayez d’exécuter gem install rake, puis lancez bundler à nouveau. Si cela ne fonctionne pas, quelques autres solutions sont listées dans le message ci-dessus.

.. cependant, cela n’a donné aucun résultat et l’erreur persiste même si je recommence le processus de clonage depuis le début.

Mise à jour :

Ce problème semble être résolu par une solution connexe TLDR : n’utilisez pas la version de Ruby fournie avec macOS.

Voir : xavi- a commenté le 16 mai 2019

J’ai suivi ses instructions (celles de xavi), suis passé à rbenv et bundle install a fonctionné, mais une confirmation est toujours nécessaire …

Mise à jour 2 :

Confirmé : Passer à rbenv et configurer la variable d’environnement PATH actuelle ~/.rbenv/shims fonctionne et résout ce problème.

export PATH=~/.rbenv/shims:$PATH

J’étais bloqué sur cette erreur et votre suggestion (ajouter rbenv dans le PATH) a fonctionné pour moi.

Merci beaucoup.