Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > How to change default gems repository on Debian

Reply
Thread Tools

How to change default gems repository on Debian

 
 
Peter Hoang
Guest
Posts: n/a
 
      08-04-2008
Hi all,

I'm trying to upgrade an old gem installation (0.9.5) on Debian machine.
On Debian, the default gem repository is /var/lib/gems/1.8. However, if
I install gem from source, the default location of the repository would
be /usr/lib/ruby/gems/1.8/. I can export GEM_HOME variable to change the
location however, this will not work for crontab scripts which bypass
bash_profile and /etc/profile. There are many crontab scripts setup by
our users and it's quite hard to force everyone to change their scripts.
Therefore, I need to make sure that the default gem repository is
/var/lib/gems/1.8. How do I force gem installation to do this instead of
using /usr/lib/ruby/gems/1.8?

Thanks.
--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
David Masover
Guest
Posts: n/a
 
      08-04-2008
On Monday 04 August 2008 02:09:18 Peter Hoang wrote:

> I can export GEM_HOME variable to change the
> location however, this will not work for crontab scripts which bypass
> .bash_profile and /etc/profile.


It might be worth trying .bashrc -- .bash_profile is specifically for
interactive logins -- but that won't work if they're using /bin/sh.

Another possibility is /etc/environment, though I remember that not working...

Worst case, there's always setting the environment variable directly
in /etc/crontab.

There's also tricks like symlinks, bind-mounts, etc.

I'm sure Rubygems can be installed wherever you like -- but you really should
solve the problem of being able to set global environment variables.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
[ANN] Builds of PyWebkitGtk and Webkit-Glib-Gtk(r39359+#16401.master) for Debian i386,Debian AMD64 and Macports MacOSX 10.4 Luke Kenneth Casson Leighton Python 0 12-31-2008 08:23 PM
Is the gems-repository down at the moment? kazaam Ruby 1 12-15-2007 02:42 AM
gems timeout on the rubyforge repository Ryan Grow Ruby 2 08-18-2006 03:52 AM
[Debian] Upgrading to kernel 2.6 in Debian DUser NZ Computing 0 01-11-2004 12:38 AM



Advertisments