FreeBSD specific issue with gems and ports

Hi!
This is FreeBSD specific issue. Maybe someone who uses FreeBSD could
help me with this: I wonder if there is any ‘recommended’ way of
installing Ruby’s gems not wrapped in separated port?

I have on 5.5 box installed:
[/var/db/pkg] $ ls -d ruby*
ruby-1.8.2_5,1/ ruby18-bdb4-0.5.3/ ruby18-gems-0.8.11/

And I did install file-tail via gems (gem install file-tail). It got
installed, but there is no sym-links. As an result simple require
‘file/tail’ does not work, since default include path for Ruby is:

$ ruby -e ‘puts $:’
/usr/local/lib/ruby/site_ruby/1.8
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd5
/usr/local/lib/ruby/site_ruby
/usr/local/lib/ruby/1.8
/usr/local/lib/ruby/1.8/i386-freebsd5

And gem have installed file-tail here:
/usr/local/lib/ruby/gems/1.8/gems/file-tail-0.1.3/lib/file/tail.rb

So, should I:

  • manually link directories to /usr/local/lib/ (ugly)
  • manually add -I statements for each script (very ugly and hard to
    maintain when new gem versions will appear)
  • search harder and find some magic and clean :wink: method to do this?

Le 7 août 2006 à 14:12, Witold R. a écrit :

So, should I:

  • manually link directories to /usr/local/lib/ (ugly)
  • manually add -I statements for each script (very ugly and hard to
    maintain when new gem versions will appear)
  • search harder and find some magic and clean :wink: method to do this?

It should work if you put a require ‘rubygems’ before the require for
the gem.

Fred

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs