Je suis un débutant Ruby, en essayant de modifier une gemme. Après quelques lectures, je comprends que la meilleure façon de le faire est avec 'Fork and Source'. J'ai une fourche de la source de gemme dont j'ai besoin, et j'ai fait toutes les modifications nécessaires et je l'ai poussé vers mon repo local.Remplacement local pour Ruby Gem ne fonctionne pas
Dans mon fichier petit bijou d'application rubis,
gem 'earnshark_sdk','0.2.0', :git => 'https://github.com/kniveditha/earnshark-sdk-ruby.git', :branch => 'master'
Je ne le gem install après
gem install earnshark_sdk
Et le paquet installe me montre, qu'il est aller chercher mon petit bijou local,
E:\Work\CoverYa\TEST>bundle install
Fetching https://github.com/kniveditha/earnshark-sdk-ruby.git
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/..
Resolving dependencies...
Using public_suffix 3.0.0
Using bundler 1.15.4
Using unf_ext 0.0.7.4 (x86-mingw32)
Using earnshark_sdk 0.2.0 from https://github.com/kniveditha/earnshark-sdk-ruby.git (at [email protected])
Using http-form_data 1.0.3
Using http_parser.rb 0.6.0
Using addressable 2.5.2
Using unf 0.1.4
Using domain_name 0.5.20170404
Using http-cookie 1.0.3
Using http 2.2.2
Bundle complete! 2 Gemfile dependencies, 11 gems now installed.
La commande Bundle list me montre également l'utilisation de la gem locale,
E:\Work\CoverYa\TEST>bundle list
Gems included by the bundle:
* addressable (2.5.2)
* bundler (1.15.4)
* domain_name (0.5.20170404)
* earnshark_sdk (0.2.0 976ec5c)
* http (2.2.2)
* http-cookie (1.0.3)
* http-form_data (1.0.3)
* http_parser.rb (0.6.0)
* public_suffix (3.0.0)
* unf (0.1.4)
* unf_ext (0.0.7.4)
En plus de spécifier le chemin dans mon Gemfile, je force aussi Bundler d'utiliser un petit bijou local pour mon environnement uniquement en utilisant l'option de configuration suivante
bundle config local.earnshark_sdk https://github.com/kniveditha/earnshark-sdk-ruby.git
Mais ma question est, quand je exécuter mon application il me donne toujours l'ancienne sortie joyau
J'ai même vérifié gem env
mon gem paths
et pour « earnshark » code de bijou dans le dossier lib
, même qui montre mon code de dépôts locaux avec al mes changements.
Où est-ce que je me suis trompé?
MISE À JOUR: Après avoir fait
bundle config local.earnshark_sdk https://github.com/kniveditha/earnshark-sdk-ruby.git
lorsque je tente de bundle install
Son me donner cette erreur,
E:\Work\CoverYa\TEST>bundle install
Cannot use local override for earnshark-sdk-ruby because
https://github.com/kniveditha/earnshark-sdk-ruby.git does not exist. Check
`bundle config --delete` to remove the local override