How to determine a repository?
I am trying to install ruby-mp3info.
I have the following URL from which I can access the gem in my browser:
http://bitbucket.org/moumar/ruby-mp3info/src/
I would like to specify this source while running gem install ruby-mp3info
When I run gem install ruby-mp3info --source=http://b开发者_C百科itbucket.org/moumar/ruby-mp3info/src
, though, I get a message back claiming this is not a repository. How do I find repositories?
Thanks!
Gem repositories must follow some special requirements. An URI is not necessary a repository. Actually, there are only a few public repositories such as:
- RubyGems (which now powers also GemCutter.org and RubyForge.org legacy indexes, see qrush's comment)
- GitHub (no longer active on new gems)
If you want to install ruby-mp3info
, just enter
$ gem install ruby-mp3info
The Gem is already hosted on the standard Gem repository (Gemcutter/RubyGems).
$ gem search ruby-mp3info -r
*** REMOTE GEMS ***
ruby-mp3info (0.6.13)
If for whatever reason you need the latest build, then install it from source. Download the code, enter the project root and type
$ ruby install.rb config
$ ruby install.rb setup
$ ruby install.rb install
精彩评论