开发者

How to install gems from RubyForge?

I am trying to install ruby-mp3info as a gem on my computer. Running sudo gem install ruby-mp3info seems to work OK. 开发者_高级运维In my environment.rb file, I added config.gem "ruby-mp3info". When I try to run the server, it fails, claiming I have some missing gems Following the error message's advice:

Run `rake gems:install` to install the missing gems.

I run the command, which simply returns my local path. Running the server again - I get the same error message.

Could someone explain what I am doing wrong? How does one go about installing gems from RubyForge - or in general?

How does the gem command know where to find the necessary files - they are not all stored on my computer. Does it have hardcoded urls built into it?


Here's what did the trick. In my environment.rb file, I had the following:

config.gem "ruby-mp3info"

Playing around with the options, I found that I had to specify the lib attribute:

config.gem "ruby-mp3info", :lib => "mp3info"

This solved the problem.


I've run into a similar problem on servers when running Phusion Passenger (mod_rails). Problem being I forget to update the Passenger gem repository like this:

/opt/ruby-enterprise-1.8.6-20090421/bin/gem install whatever

instead of simply this:

gem install whatever

It would be a useful utility for someone to write, keeping the 2 gem repos in sync.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜