# Configure Rails to Use Auth0

**URL:** <https://community.auth0.com/t/configure-rails-to-use-auth0/39024>\
**Category:** Get Help\
**Created:** [March 8, 2020, 9:28pm UTC](https://community.auth0.com/t/configure-rails-to-use-auth0/39024 "2020-03-08T21:28:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jfeuzeu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jfeuzeu/32/19327_2.png) [@jfeuzeu](https://community.auth0.com/u/jfeuzeu)\
**Post date:** [March 8, 2020, 9:28pm UTC](https://community.auth0.com/t/configure-rails-to-use-auth0/39024/1 "2020-03-08T21:28:54Z")

</div>

Hello,  
I tried to follow the instruction on this page, [https://auth0.com/docs/quickstart/webapp/rails/01-login](https://auth0.com/docs/quickstart/webapp/rails/01-login), to configure the Ruby on Rails and the first instruction is not working. Below is what I get when executing the command to “installing the dependencies”:  
~# gem ‘omniauth-auth0’, ‘~\> 2.2’  
ERROR: While executing gem … (Gem::CommandLineError)  
Unknown command omniauth-auth0,

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 8, 2020, 9:48pm UTC](https://community.auth0.com/t/configure-rails-to-use-auth0/39024/2 "2020-03-08T21:48:58Z")

</div>

Hi @jfeuzeu,

are you running

`gem ‘omniauth-auth0’, ‘~> 2.2’`

as a command right in your terminal? That should belong in the `Gemfile`, and what you should execute then is just

`bundle install`

* * *

Or, if you directly want to install it on the terminal, it would be via `gem install`, such as

`sudo gem install omniauth-auth0 -v '2.2' --source 'https://rubygems.org/'`

(I’m no RoR developer at all, it’s just my take on quickly checking the quickstart.)

---

<div class="post-metadata">

**Author:** ![jfeuzeu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jfeuzeu/32/19327_2.png) [@jfeuzeu](https://community.auth0.com/u/jfeuzeu)\
**Post date:** [March 8, 2020, 11:23pm UTC](https://community.auth0.com/t/configure-rails-to-use-auth0/39024/3 "2020-03-08T23:23:07Z")

</div>

> [@mathiasconradt](#):
>
> sudo gem install omniauth-auth0 -v ‘2.2’ --source ‘[https://rubygems.org/](https://rubygems.org/)’

Hello, Yes I’m running from the terminal, via ssh. OK, thanks. How would I run the next commands (# gem ‘omniauth-rails\_csrf\_protection’, ‘~\> 0.1’ & # bundle install) from the terminal as well?  
I tried running #gem ‘omniauth-rails\_csrf\_protection’, ‘~\> 0.1’ and got the same error.

Thanks again

---

<div class="post-metadata">

**Author:** ![mathiasconradt](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mathiasconradt/32/12758_2.png) [@mathiasconradt](https://community.auth0.com/u/mathiasconradt)\
**Post date:** [March 9, 2020, 7:23am UTC](https://community.auth0.com/t/configure-rails-to-use-auth0/39024/4 "2020-03-09T07:23:03Z")

</div>

It’s always the same pattern. Just replace module name and version.

`sudo gem install <MODULE> -v '<VERSION>' --source 'https://rubygems.org/'`

Note though that this is not what the Quickstart on [Auth0 Ruby On Rails SDK Quickstarts: Login](https://auth0.com/docs/quickstart/webapp/rails/01-login) says. It does not say to execute the “gem” commands on command line / terminal, it says to add them to the Gemfile. Just saying, in case you wanted to strictly follow the instructions in the quickstart.

---

<div class="post-metadata">

**Author:** ![jfeuzeu](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jfeuzeu/32/19327_2.png) [@jfeuzeu](https://community.auth0.com/u/jfeuzeu)\
**Post date:** [March 9, 2020, 7:41am UTC](https://community.auth0.com/t/configure-rails-to-use-auth0/39024/5 "2020-03-09T07:41:53Z")

</div>

Sure, thanks. I think I need to get a developer comfortable with ssh to get this done.  
Thanks a lot!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 24, 2020, 7:41am UTC](https://community.auth0.com/t/configure-rails-to-use-auth0/39024/6 "2020-03-24T07:41:58Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
