# Installing own gem in plugin

**URL:** https://meta.discourse.org/t/installing-own-gem-in-plugin/54351
**Category:** Development
**Created:** [December 16, 2016, 12:13pm UTC](https://meta.discourse.org/t/installing-own-gem-in-plugin/54351 "2016-12-16T12:13:49Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![shirjeelalam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shirjeelalam/32/65235_2.png) [@shirjeelalam](https://meta.discourse.org/u/shirjeelalam)
#### Post date: [December 16, 2016, 12:13pm UTC](https://meta.discourse.org/t/installing-own-gem-in-plugin/54351/1 "2016-12-16T12:13:49Z")

</div>

I want to install ‘omniauth-openid-connect’ gem in a plugin

my plugin.rb file

> gem ‘omniauth-openid-connect’, ‘0.2.3’

In development mode, when i run my local server, I get the following error:

> \*\*\* Gem::LoadError Exception: Could not find ‘attr\_required’ (\>= 1.0.0) among 178 total gem(s)  
> Checked in ‘GEM\_PATH=/Users/me/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0:/Users/me/.gem/ruby/2.3.0’, execute `gem env` for more information

While “attr\_required” is present in plugin’s gem directory /plugins/my\_plugin/gems/2.3.0/, as well as other dependent gems

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 16, 2016, 12:28pm UTC](https://meta.discourse.org/t/installing-own-gem-in-plugin/54351/2 "2016-12-16T12:28:24Z")

</div>

> [@Requiring external gems](https://meta.discourse.org/t/requiring-external-gems/53280/2):
>
> Keep in mind you have to declare the gems AND dependencies.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [December 6, 2018, 4:59pm UTC](https://meta.discourse.org/t/installing-own-gem-in-plugin/54351/3 "2018-12-06T16:59:09Z")

</div>

@shirjeelalam I’m not sure if you ever managed to get your plugin working, but we now have an official one for OpenID Connect which you may find useful

> [@Discourse OpenID Connect (OIDC)](https://meta.discourse.org/t/openid-connect-authentication-plugin/103632):
>
> discourse2Summary Discourse OpenID Connect allows an OpenID Connect provider to be used as an authentication provider for Discourse.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Features The plugin aims to provide a minimal implementation of [the specification](https://openid.net/specs/openid-connect-basic-1_0.html). Specifically, it supports the “Authorization Code Flow”. To get started, follow [the plugin installation instructions](https://meta.discourse.org/t/install-plugins-in-discourse/19157), or contact your hosti…

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [December 20, 2018, 6:00pm UTC](https://meta.discourse.org/t/installing-own-gem-in-plugin/54351/4 "2018-12-20T18:00:07Z")

</div>

This topic was automatically closed after 14 days. New replies are no longer allowed.
