Unable to install Gems with RubyGems on Intel OSX with Darwi

I followed Duncan Davidson’s Sandboxing Rails with Darwin Ports guide
and
everything went fine up till the part where I had to install gems using
gem
install. I would get this stacktrace:

Attempting local installation of ‘rake’
Local gem file not found: rake*.gem
Attempting remote installation of ‘rake’
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:204:in
report_activate_error': Could not find RubyGem sources (> 0.0.0) (Gem::LoadError) from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:141:inactivate’
from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems .rb:37:in
require_gem_with_options' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:31:inrequire_gem’
from
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/remote_installer.rb:425:in
sources' from /opt/local/lib/ruby/vendor_ruby/1.8/ rubygems/remote_installer.rb:435:insource_index_hash’
from
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/remote_installer.rb:399:in
install' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/gem_commands.rb:195:inexecute’
from /opt/local/lib/ruby/vendor_ruby/1.8/
rubygems/gem_commands.rb:153:in
execute' from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems/command.rb:49:ininvoke’
from
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/cmd_manager.rb:94:in
process_args' from /opt/local/lib/ruby/vendor_ruby/1.8/ rubygems/cmd_manager.rb:67:inrun’
from
/opt/local/lib/ruby/vendor_ruby/1.8/rubygems/gem_runner.rb:13:in
`run’
from /opt/local/bin/gem:17

Adding GEM_PATH and GEM_HOME variables to ~/.profile didnt work either:

export PATH=/opt/local/bin:/opt/local/sbin:/opt/local/apache2/bin:$PATH
export RUBYLIB=/opt/local/lib/ruby/site_ruby/1.8:/opt/local/lib/ruby/1.8
export GEM_PATH=/opt/local/lib/ruby/gems/1.8
export GEM_HOME=/opt/local/lib/ruby/gems/1.8

Darwin Ports is installing ports in /opt/local/
Is there something I’m missing here?

This is the output I got:

Welcome to Darwin!
douglas-computer:~ douglas$ which ruby
/opt/local/bin/ruby
douglas-computer:~ douglas$ which gem
/opt/local/bin/gem
douglas-computer:~ douglas$ port --version
Warning: (please use “port version” to get version information)
Version: 1.211
douglas-computer:~ douglas$ ruby -v
ruby 1.8.4 (2005-12-24) [i686-darwin8.7.1]
douglas-computer:~ douglas$ gem -v
0.8.11

strange, can you quickly verify that the expected ruby and gem are being
used:
% which ruby && which gem
and for good measure:
% ruby -v && gem -v && port --version

cheers,
jean-pierre

On 7/30/06, Douglas T. [email protected] wrote:

    from

/opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:141:in
`activate’

[…]

On 7/31/06, Douglas T. [email protected] wrote:

douglas-computer:~ douglas$ ruby -v
ruby 1.8.4 (2005-12-24) [i686-darwin8.7.1]
douglas-computer:~ douglas$ gem -v
0.8.11

those are the expected results, how about this:
% gem environment

if you explicitly tell gem to install from remote source, what happens?
% sudo gem install rake --remote

last shot in the dark, does an update help at all?
% sudo gem update

cheers,
jean-pierre

solved the problem after following the steps to manually install the
sources
gem in this thread:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/205011

On 7/31/06, Douglas T. [email protected] wrote:

solved the problem after following the steps to manually install the sources
gem in this thread:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/205011

i am glad you got it sorted out. for what it is worth, i just
installed darwinports 1.3.1 (released yesterday) on a fresh install
of 10.4.7 on a macbook pro and didn’t run into the problem you
mentioned above when running though jdd’s sandboxing instructions.
perhaps there was an issue with the gems port that is now resolved…

cheers,
jean-pierre

Douglas T. wrote:

solved the problem after following the steps to manually install the
sources
gem in this thread:
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/205011

There also another link with excellent instructions on installing the
Rails/Lighttpd system…