On Wed, May 25, 2011 at 08:40:29AM -0400, Chris Lalancette wrote:
On 05/25/11 - 01:02:04PM, Francesco Vollero wrote:
> On Wed, May 25, 2011 at 04:01:34PM +1000, Justin Clift wrote:
> > On 18/05/2011, at 2:30 AM, fvollero(a)redhat.com wrote:
> > > From: Francesco Vollero <fvollero(a)redhat.com>
> > >
> > > ---
> > > recipes/aeolus_recipe/templates/deltacloud-core | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/recipes/aeolus_recipe/templates/deltacloud-core
b/recipes/aeolus_recipe/templates/deltacloud-core
> > > index c39cbdc..0f52b65 100644
> > > --- a/recipes/aeolus_recipe/templates/deltacloud-core
> > > +++ b/recipes/aeolus_recipe/templates/deltacloud-core
> > > @@ -16,7 +16,7 @@ PORT="${PORT:-<%= port %>}"
> > > LOCKFILE="${LOCKFILE:-/var/lock/subsys/deltacloud-<%= name %>
}"
> > > LOGFILE="${LOGFILE:-/var/log/deltacloud-<%= name
%>/$DRIVER.log}"
> > > PIDFILE="${THIN_PID:-/var/run/deltacloud-<%= name
%>.pid}"
> > > -export
DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-<%= name
%>-0.2.0/lib/deltacloud/drivers/mock/data/
> > > +export
DELTACLOUD_MOCK_STORAGE=/usr/lib/ruby/gems/1.8/gems/deltacloud-<%= name
%>-0.3.0/lib/deltacloud/drivers/mock/data/
> >
> > Pretty sure mfojtik mentioned a variable at some point, which can be used
> > instead of the hard-coded ruby 1.8 gem path. Just thinking it might be
> > worth doing that, to add a bit of flexibility (ie testing with Ruby 1.9,
> > etc)
> >
> > ?
>
> TBH i dont know about this "variable" that i suppose gonna be gathered
from gem env gemdir since this is the most clean way to access those infos...anyway, i
just take it from [1] and published as needed :)
So the way we do it in all of the RPMs is:
ruby -rubygems -e 'puts Gem::dir'
We should probably do something similar here.
Yes Chris,
[fvollero@fermat ~]$ ruby -rubygems -e 'puts Gem::dir'
/usr/lib/ruby/gems/1.8
[fvollero@fermat ~]$ gem env gemdir
/usr/lib/ruby/gems/1.8
[fvollero@fermat ~]$
they return the identical result.
Cheers,
Francesco
--
Chris Lalancette