Installing Figaro gem on Linux

Simeon Revales
2 min readMay 8, 2020

I’m currently working through The Odin Project curriculum and I have realized a major pain is when gems do not install correctly. Surprisingly, it is very difficult to find a solution to resolving gem dependencies, especially as a code newbie. So I have decided to write this quick post about how I resolved the Figaro gem issue that I faced.

I’m using Xubuntu — Oracle VM /Linux.

Step 1: Add this to your gemfile -> gem ‘figaro’, ‘~> 1.1’, ‘>= 1.1.1’

Step 2: Run -> bundle install

Step 3: Run -> bundle exec figaro install

Now if step 3 is run successfully, then you are good to go but if you’re like me, you’ll receive this error below. It highlights a dependency on thor.

Now, I tried using the most recent thor gemfile but that did not work. After spending some time searching, I came across this SO answer which worked for me.

Step 4: Add -> gem “thor”, “~> 0.19.1”

Step 5: Run -> bundle install

You may need to run bundle update if you already installed a different version of thor before this post.

Step 6: Run -> bundle exec figaro install

And now it should have been successfully ran!