Projects
New Ticket     Wiki     Browse Source     Timeline     Roadmap     Bug Reports     Search

Ticket #11751 (closed defect: fixed)

Opened 20 months ago

Last modified 6 months ago

BUG: rb-rubygems-0.9.2 gem command does not work

Reported by: thomaslenoir@… Owned by: macports-tickets@…
Priority: Normal Milestone: Port Bugs
Component: ports Version: 1.4
Keywords: Cc: yuhei@…, thomaslenoir@…, boeyms@…
Port:

Description

rb-rubygems installs well but here's what I get when I want to run it:

thepoisonapple:~ thomas$ gem help
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- sources (LoadError)
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/source_info_cache.rb:6
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/remote_installer.rb:12
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:27:in `require'
        from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:112:in `manage_gems'
        from /opt/local/bin/gem:10

Change History

Changed 19 months ago by arturoc@…

I received the same error. I tried to uninstall rubygems and reinstall with the following results:

sudo port install rb-rubygems ---> Fetching rb-rubygems ---> Verifying checksum(s) for rb-rubygems ---> Extracting rb-rubygems Error: Target com.apple.patch returned: reinplace: unknown flag '-s%Gem.dir%'/opt/local/var/db/dports/build/_opt_local_var_db_dports_sources_rsync.rsync.darwinports.org_dpupdate_dports_ruby_rb-rubygems/work/destroot/opt/local/lib/ruby/gems/1.8'%' Error: Status 1 encountered during processing.

Changed 19 months ago by timm@…

I run into the same problem, when installing MacPorts from scratch. It seems that this ticket is related to ticket #10810.

I used the following script to get the gems up and running:

cd /opt/local/lib/ruby/gems/
export RUBYLIB=$PWD/gems/sources-0.0.1/lib
sudo gem install cache/sources-0.0.1.gem
unset RUBYLIB

Changed 16 months ago by lachlan.deck@…

Can we not just (at the very least) add a post-install instruction like the following?

post-install {
    ui_msg "\n cd ${prefix}/lib/ruby/gems"
    ui_msg "export RUBYLIB=$PWD/gems/sources-0.0.1/lib"
    ui_msg "sudo ${prefix}/bin/gem install cache/sources-0.0.1.gem"
    ui_msg "unset RUBYLIB"
}

At least then people aren't in the dark as to the final step needed for getting it working. Of course if that can be automated as part of the install that'd be better.

Changed 13 months ago by fusion@…

I was bitten by this problem last night, but I think the gem version number has gone up.

Changed 12 months ago by dsantos@…

Is it still open ?

$ export GEM_PATH=/opt/local/lib/ruby/gems $ sudo gem install sources

Changed 11 months ago by boeyms@…

  • cc yuhei@…, thomaslenoir@…, boeyms@… added; yuhei@… removed

I've been trying to figure out how to get this fixed, but to no avail; unfortunately, I'm not much chop with ruby or rubygems myself. Unfortunately, the listed maintainer seems to no longer be with the MacPorts project (I'll mark it nomaintainer soon), so we can't look there for help.

In the mean time, I'll see if we can add something like an automated version of the workaround in comment:3 above, or otherwise that post-install message; my one concern is whether or not the above is sufficient in the context of activation/deactivation. I'll also note that, at least recently, simply uninstalling and reinstalling rb-rubygems seems to work (I think that the portfile has been updated since comment:1 above).

I wish I could figure out what was going on here; it's bizarre.

Changed 11 months ago by jmpp@…

  • priority changed from High to Normal

Changed 6 months ago by mr_bond@…

  • status changed from new to closed
  • resolution set to fixed

rb-rubygems 1.1.1 requires ruby from macports, gem installs in the right prefix

Note: See TracTickets for help on using tickets.