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.

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