Changing the reading order of Rubygem sources

I created my own gem, which I placed myself. Everything went well until someone created a gem of the same name on rubygems.org. Since rubygems.org has the highest priority compared to my gem server url. I can no longer install my gem. I tried to remove the rubygems source:

$ sudo gem source -r http://rubygems.org

and reinstall it so that it appears in the list of gem sources, but it doesn’t work.

Is there a way to change the search order of a gem source?

Note that I do not want to rename my gem.

+5
source share
2 answers

, . http://rubygems.org gem source -r http://rubygems.org, , . - , .

( ), .

$ gem source add http://internal-server/
$ gem source
*** CURRENT SOURCES ***

 http://rubygems.org/
 http://internal-server/
$ gem source -r http://rubygems.org/
$ gem source
*** CURRENT SOURCES ***

http://internal-server/
$ gem source -a http://rubygems.org/
$ gem source
*** CURRENT SOURCES ***

http://internal-server/
http://rubygems.org/
+3

specific_install:

gem install specific_install gem specific_install -l <git-url>

- gem :

gem install mygem -s http://gems.example.com

, , Bundler. Gemfile :

gem 'mygem', :git => 'git://git.example.com/myrepo.git'

+2

All Articles