# RFE: include dalli gem in ondemand bundle

**URL:** <https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321>\
**Category:** Feature Requests and Roadmap Discussion\
**Created:** [February 12, 2021, 8:04am UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321 "2021-02-12T08:04:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![stdweird](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/stdweird/32/627_2.png) [@stdweird](https://discourse.openondemand.org/u/stdweird)\
**Post date:** [February 12, 2021, 8:04am UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/1 "2021-02-12T08:04:37Z")

</div>

We have some apps that do some very slow lookups to external resources, and we currenlty cache them using memcache, but adding the dalli gem that is required for memcache support is always a pain.  
Is it possible that the dalli gem is part of the ondemand gems bundle? (we only need it for the dashboard app)

Many thanks

stijn

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [February 12, 2021, 1:56pm UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/2 "2021-02-12T13:56:09Z")

</div>

> [@stdweird](#):
>
> adding the dalli gem that is required for memcache support is always a pain

What is the process you currently use to add the dalli gem for your particular apps?

---

<div class="post-metadata">

**Author:** ![stdweird](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/stdweird/32/627_2.png) [@stdweird](https://discourse.openondemand.org/u/stdweird)\
**Post date:** [February 12, 2021, 2:20pm UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/3 "2021-02-12T14:20:12Z")

</div>

hello,

we currently use the rh-ruby25 gem to install the bundle, and then copy the content of the gems lib to a generic ruby search path (but not a default gem install path).

the issue likely is that the bundle (or the way bundler works, not sure and not a ruby expert) restricts all possible gem paths that are searched (i strace’d passenger to find a path that was searched by default to place the rb files in)

we might package it up, but even if there was a rpm from eg. scl with the gem, it wouldn’t be discovered anyway

stijn

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [February 12, 2021, 2:27pm UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/4 "2021-02-12T14:27:28Z")

</div>

Oh I see, you want the dalli gem:

1. installed to be accessible to rh-ruby25
2. added as a dependency to the dashboard app

So you can use dalli in a batch connect/interactive app plugin?

---

<div class="post-metadata">

**Author:** ![tdockendorf](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/tdockendorf/32/202_2.png) [@tdockendorf](https://discourse.openondemand.org/u/tdockendorf)\
**Post date:** [February 12, 2021, 2:35pm UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/5 "2021-02-12T14:35:55Z")

</div>

The OnDemand SCL has this logic when you do `scl enable ondemand`:

```
for dir in /opt/ood/ondemand/root/usr/share/gems/2.5/apps/* ; do
  export GEM_PATH="${dir}:${GEM_PATH}"
done

```

The OnDemand RPM building environment makes it possible for apps to “know” about this special GEM\_PATH at build time. A good example is the OSC systemstatus app spec file: [osc-systemstatus/ondemand-systemstatus.spec at master · OSC/osc-systemstatus · GitHub](https://github.com/OSC/osc-systemstatus/blob/master/packaging/ondemand-systemstatus.spec)

The app name used in GEM\_PATH doesn’t have to match an actual app, it just has to be something our bash logic can see and load into GEM\_PATH.

---

<div class="post-metadata">

**Author:** ![efranz](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/efranz/32/27_2.png) [@efranz](https://discourse.openondemand.org/u/efranz)\
**Post date:** [February 12, 2021, 2:57pm UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/6 "2021-02-12T14:57:06Z")

</div>

We could probably add this as a gem to be available in future release. Until then, here is an alternative approach. You can modify /var/www/ood/apps/dashboard/Gemfile to include this line:

```auto
gem 'dalli'

```

And then in that directory you can run this command:

```auto
scl enable ondemand -- bin/bundle install --path vendor/bundle

```

This will reinstall a copy of all the gems to the dashboard app’s local vendor/bundle directory and then drop a .bundle/config file that stores the path to where those gems are located.

---

<div class="post-metadata">

**Author:** ![stdweird](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/stdweird/32/627_2.png) [@stdweird](https://discourse.openondemand.org/u/stdweird)\
**Post date:** [February 12, 2021, 6:14pm UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/7 "2021-02-12T18:14:15Z")

</div>

@efranz my apologies for being so unclear, but yes that is what i want to do.

thanks for the explanation. i tried adding it with bundle, but i failed to come up with the required magic 😉

but thanks for the explanation

i am only hoping this can become part of the 2.X releases; i don’t need anything for current or older releases.

thanks for the explanation and considering it!

stijn

---

<div class="post-metadata">

**Author:** ![westburg.2](https://avatars.discourse-cdn.com/v4/letter/w/0ea827/32.png) [@westburg.2](https://discourse.openondemand.org/u/westburg.2)\
**Post date:** [May 26, 2022, 4:11pm UTC](https://discourse.openondemand.org/t/rfe-include-dalli-gem-in-ondemand-bundle/1321/8 "2022-05-26T16:11:34Z")

</div>

Closed on May 26, 2022, 4:11pm UTC


