Thanks for your message. In Solaris, sudo doesn't pass PATH info to
the command.
http://ruby-oci8.rubyforge.org/en/InstallForInstantClient.html
(scroll down to end of the page and you'll see :
ruby-oci8 try to get the Instant Client location from library search
path.
note: If you use sudo, use it only when running 'make install'. sudo
doesn't pass library search path to the executing command for security
reasons

So, what should I do to make sure gems are installed and available
globally?

Also, another question: I was trying to do a rake db:migrate but I got
errors. Like this:
******
bash-3.00$ rake db:migrate
bash: /opt/coolstack/bin/rake: Permission denied
bash-3.00$ ls -ltr /opt/coolstack/bin/rake
-rwxr-x---   1 root     root         374 Sep 16 07:17 /opt/coolstack/
bin/rake
*****
Did the sys-admin forget to give me permission to run rake or am I
doing something wrong? And how to fix this? I am not root. I can do
sudo gem, sudo ruby. But that's about it.

On Sep 18, 1:54 am, Colin Law <[email protected]> wrote:
> 2009/9/18 catel1 <[email protected]>:
>
>
>
> > Thanks, Eric, for great response. The problem with doing "sudo gem
> > install" is that I think env variables such as "PATH" are not passed
> > when you do sudo. So, gems might give some errors.
>
> > I am not familiar with environment.rb method. Could you explain or
> > give me a link about this? I'd like gems to be globally available to
> > all ruby/rails users.
>
> I don't know about Solaris but on Ubuntu sudo gem install is the way to do it.
>
> Colin
>
>
>
> > Thanks.
>
> > On Sep 17, 6:41 pm, Eric <[email protected]> wrote:
> >> It doesn't really matter and primarily depends on your execution
> >> environment. If you `sudo gem install ...` it will put them in the
> >> system gem directory, if you are installing them as a user, it will
> >> give you that error and create a .gem directory in your home
> >> directory. What's important is that the gems are available to the user
> >> that the app will run under, though if you use the environment.rb
> >> method (typically "config.gem ..."), you can install all of the gems
> >> to that user's environment upon deployment via rake gems:install.
>
> >> At any rate, you should never have to use a mode of 777. If you think
> >> you do, you're likely Doing It Wrong.
>
> >> -eric
>
> >> On Sep 17, 5:55 pm, catel1 <[email protected]> wrote:
>
> >> > I am new to Solaris and new to Ruby. When I install some gem file
> >> > using
> >> > gem install, I get this warning. I'd like to make these gems available
> >> > globally:
>
> >> > bash-3.00$ gem install thor
> >> > WARNING:  Installing to ~/.gem since /opt/coolstack/lib/ruby/gems/1.8
> >> > and
> >> >           /opt/coolstack/bin aren't both writable.
> >> > /opt/coolstack/lib/ruby/site_ruby/1.8/rubygems/installer.rb:149:
> >> > warning: Insecure world writable dir /opt/coolstack/lib/ruby in PATH,
> >> > mode 040777
>
> >> > Should I just chmod 777 /opt/coolstack/lib/ruby/gems/1.8 /opt/
> >> > coolstack/bin
>
> >> > or should I do something else?- Hide quoted text -
>
> >> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to