# Unable to install Gems with RubyGems on Intel OSX with Darwi

**URL:** <https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821>\
**Category:** Rails\
**Created:** [July 31, 2006, 3:46am UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821 "2006-07-31T03:46:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Douglas\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Post date:** [July 31, 2006, 3:46am UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821/1 "2006-07-31T03:46:46Z")

</div>

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:in`activate’  
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:in`require\_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:in`source\_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:in`execute’  
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:in`invoke’  
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:in`run’  
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?

---

<div class="post-metadata">

**Author:** ![Douglas\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Post date:** [July 31, 2006, 2:58pm UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821/2 "2006-07-31T14:58:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Douglas\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Post date:** [July 31, 2006, 6:33am UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821/3 "2006-07-31T06:33:15Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> from
> 
> ```
> 
> /opt/local/lib/ruby/vendor\_ruby/1.8/rubygems.rb:141:in  
> `activate’

[…]

---

<div class="post-metadata">

**Author:** ![Douglas\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Post date:** [July 31, 2006, 6:02pm UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821/4 "2006-07-31T18:02:43Z")

</div>

On 7/31/06, Douglas T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![Douglas\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Post date:** [August 1, 2006, 3:45am UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821/5 "2006-08-01T03:45:25Z")

</div>

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](http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/205011)

---

<div class="post-metadata">

**Author:** ![Douglas\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Post date:** [August 1, 2006, 5:33pm UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821/6 "2006-08-01T17:33:43Z")

</div>

On 7/31/06, Douglas T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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](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

---

<div class="post-metadata">

**Author:** ![Douglas\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ecccb3/32.png) [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Post date:** [August 1, 2006, 4:37am UTC](https://www.ruby-forum.com/t/unable-to-install-gems-with-rubygems-on-intel-osx-with-darwi/102821/7 "2006-08-01T04:37:14Z")

</div>

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](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…

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.
