Configure Rails to Use Auth0

Hello,
I tried to follow the instruction on this page, Auth0 Ruby On Rails SDK Quickstarts: 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,

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.)

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

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 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.

1 Like

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

1 Like

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