tag:help.rubygems.org,2010-01-19:/discussions/problems/1271-installing-rubygems-and-individual-gems-on-osx-mountain-lionRubyGems.org: Discussion 2018-10-18T19:51:14Ztag:help.rubygems.org,2010-01-19:Comment/179010582012-08-08T18:13:34Z2012-08-08T18:13:34Zinstalling rubygems and individual gems on OSX "mountain lion"<div><p>Please show the output of <code>gem env</code></p>
<p>If you have modified the permissions of the Apple Ruby
installation you may need to periodically re-apply them. Apple may
revert changes you make when you install software updates.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/179010582012-08-08T22:07:36Z2012-08-08T22:07:37Zinstalling rubygems and individual gems on OSX "mountain lion"<div><p>[ rick ] gem env administrators-MacBook-Pro:~/Sites/snm RubyGems
Environment:<br>
- RUBYGEMS VERSION: 1.8.24 - RUBY VERSION: 1.8.7 (2012-02-08
patchlevel 358) [universal-darwin12.0] - INSTALLATION DIRECTORY:
/Library/Ruby/Gems/1.8 - RUBY EXECUTABLE:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
- EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS:</p>
<pre>
<code>- ruby
- universal-darwin-12</code>
</pre>
<ul>
<li>GEM PATHS:
<ul>
<li>/Library/Ruby/Gems/1.8</li>
<li>/Users/rick/.gem/ruby/1.8</li>
<li>
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8</li>
</ul>
</li>
<li>GEM CONFIGURATION:
<ul>
<li>:update_sources => true</li>
<li>:verbose => true</li>
<li>:benchmark => false</li>
<li>:backtrace => false</li>
<li>:bulk_threshold => 1000</li>
<li>:sources => ["<a href=
"http://rubygems.org/">http://rubygems.org/</a>", "<a href=
"http://gems.rubyforge.org">http://gems.rubyforge.org</a>",
"<a href=
"http://gems.github.com/">http://gems.github.com/</a>"]</li>
</ul>
</li>
<li>REMOTE SOURCES:
<ul>
<li><a href="http://rubygems.org/">http://rubygems.org/</a></li>
<li><a href=
"http://gems.rubyforge.org">http://gems.rubyforge.org</a></li>
<li><a href="http://gems.github.com/">http://gems.github.com/</a> [
rick ]</li>
</ul>
</li>
</ul></div>Richard Karpinskitag:help.rubygems.org,2010-01-19:Comment/179010582012-08-08T22:11:37Z2012-08-08T22:11:37Zinstalling rubygems and individual gems on OSX "mountain lion"<div><p>If you change the permissions on /Library/Ruby/Gems/1.8 you may
need to periodically reapply your changes.</p>
<p>You can set <code>all: --user-install</code> in your ~/.gemrc to
install gems into your home directory to avoid this extra step, or
you can set GEM_HOME to a directory you control to avoid typing
sudo.</p></div>Eric Hodeltag:help.rubygems.org,2010-01-19:Comment/179010582012-08-11T18:05:12Z2012-08-11T18:05:12Zinstalling rubygems and individual gems on OSX "mountain lion"<div><p>Many thanks for your advice!<br>
I got things going by adding these lines to .gemrc:</p>
<h1>make install location accessible to 'rick'</h1>
<p>all:<br>
- user-install then needed to put export
PATH=$PATH:/Users/rick/.gem/ruby/1.8/bin<br>
into my bash_profile</p>
<p>but that seems to let everything work without "sudo".</p>
<hr>
<p>A couple of things, though:<br>
<a href=
"http://docs.rubygems.org/read/chapter/11">http://docs.rubygems.org/read/chapter/11</a><br>
didn't help me figure out how to put things correctly into .gemrc
(e.g. "all:" and leading colons in ":sources", ":benchmark", etc.);
and it wasn't clarified in en.wikipedia.org/wiki/YAML</p>
<p>....not a complaint, just a plea for more explicit clarification
for newbies like me.</p>
<p>How about a HOWTO for installing (or not) various versions of
RUBY under "mountain lion" and one for setting up GEMS in various
scenarios under "mountain lion".</p>
<p>Again, many thanks.</p>
<p>--RK</p></div>Richard Karpinski