Thank you Jared,<br><br>About the user's gem directory (without using sudo) the sys admin suggested:<br><br><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> I’ve
created /gems with all the current gems in it.</span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> Try setting up </span></font></p><p class="MsoNormal"><span><font color="#1d1c1c" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: rgb(29, 28, 28);"> ENV['GEM_PATH']
= '</span></font></span>/gems/1.8’</p><p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> On your apps and </span></font></p><p class="MsoNormal">
<font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"> export GEM_PATH=/gems/1.8</span></font></p><p class="MsoNormal"><br><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"></span></font></p>
<p class="MsoNormal"><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Exporting an environment path in a Rails app? I have never seen something like that but the idea, in the end, it is to use a path where I have permissions. Of course I need sudo to update Passenger and MySql (although they might be stored in /gems) too.<br>
</span></font></p><br><br><div class="gmail_quote">On 21 March 2011 16:53, Jared Patterson <span dir="ltr"><<a href="mailto:Jared.Patterson@betfair.com">Jared.Patterson@betfair.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-GB"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hey Riccardo,</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">To allow you to update your own gems using sudo, just ask your admin to add something like the following into ‘/etc/sudoers’, which is based on your username:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">riccardo ALL=(ALL) NOPASSWD: /usr/bin/gem *</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Ofcourse, being Solaris, you will need to check where the gem binary resides, (which gem) should do the trick. Also, if sudo was installed with the solaris package, the sudoers file is likely to be in ‘/opt/sfw/etc/sudoers’.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Incase you cant locate it, trying using truss to find it (as root):</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">truss –o /tmp/truss.out sudo ls</span></p><p class="MsoNormal">
<span style="font-size: 11pt; color: rgb(31, 73, 125);">grep sudoers /tmp/truss.out</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">you should see something like:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">open("/opt/sfw/etc/sudoers", O_RDONLY) = 4</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Cheers</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><b><span style="font-size: 10pt; color: black;">Jared Patterson</span></b><span style="font-size: 10pt; color: black;"></span></p><p class="MsoNormal"><span style="font-size: 10pt; color: black;">Unix Engineer</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: black;">IS Unix Frontend – Product Delivery</span></p><p class="MsoNormal"><span style="font-size: 10pt; color: black;"> </span></p><p class="MsoNormal"><span style="font-size: 10pt; color: black;">Office: +44 (0) 20 8834 6506</span></p>
<p class="MsoNormal" style="margin-bottom: 12pt;"><span style="font-size: 10pt; color: black;">Yahoo IM: patterson.jared84</span></p><p class="MsoNormal"><b><span style="font-size: 9pt; color: gray;">Betfair. The World’s Biggest Betting Community.</span></b><span style="font-size: 10pt; color: gray;"> </span><span style="font-size: 10pt; color: black;"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: gray;">Betfair Limited | Winslow Road | Hammersmith Embankment | London | W6 9HP</span><span style="font-size: 10pt; color: blue;"> </span><span style="font-size: 10pt; color: black;"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: gray;">Registered in England and Wales under company number 5140986 </span><span style="font-size: 10pt; color: black;"></span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:chat-bounces@lists.lrug.org" target="_blank">chat-bounces@lists.lrug.org</a> [mailto:<a href="mailto:chat-bounces@lists.lrug.org" target="_blank">chat-bounces@lists.lrug.org</a>] <b>On Behalf Of </b>Riccardo Tacconi<br>
<b>Sent:</b> 21 March 2011 15:33<br><b>To:</b> London Ruby Users Group<br><b>Subject:</b> [LRUG] Ruby environment under Solaris</span></p><div><div></div><div class="h5"><p class="MsoNormal"> </p><p class="MsoNormal">Hi,<br>
<br>I am not the sys admin but a developer having my apps in a Solaris environment without root privileges. Now we have a new server, but in the previous one the admin install multiruby and I was able to update the gems and even update Passenger and Mysql gem via sudo. In the new environment there is not multiruby and not the same sys admin and I would like to be able to manage my gems. To you have any suggestions. I know about rvm (I use it in my Mac) but it has issues on Solaris since it uses GNU commands. Do you have any simple solution, easy to configure that might work under Solaris?<br clear="all">
<br>-- <br>Riccardo Tacconi<br>Ruby on Rails and PHP development - System Administration<br>VIRTUELOGIC LIMITED<br><br><a href="http://github.com/rtacconi" target="_blank">http://github.com/rtacconi</a><br><a href="http://riccardotacconi.blogspot.com" target="_blank">http://riccardotacconi.blogspot.com</a><br>
<a href="http://twitter.com/rtacconi" target="_blank">http://twitter.com/rtacconi</a><br><a href="http://www.linkedin.com/in/riccardotacconi" target="_blank">http://www.linkedin.com/in/riccardotacconi</a></p></div></div></div>
<br>
________________________________________________________________________<br>
In order to protect our email recipients, Betfair Group use SkyScan from <br>
MessageLabs to scan all Incoming and Outgoing mail for viruses.<br>
<br>
________________________________________________________________________<br>
</div><br>_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
<a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Riccardo Tacconi<br>Ruby on Rails and PHP development - System Administration<br>VIRTUELOGIC LIMITED<br><br><a href="http://github.com/rtacconi" target="_blank">http://github.com/rtacconi</a><br>
<a href="http://riccardotacconi.blogspot.com" target="_blank">http://riccardotacconi.blogspot.com</a><br><a href="http://twitter.com/rtacconi" target="_blank">http://twitter.com/rtacconi</a><br><a href="http://www.linkedin.com/in/riccardotacconi" target="_blank">http://www.linkedin.com/in/riccardotacconi</a><br>