Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start over with a clean gems install for jekyll?

Tags:

ruby

jekyll

I've been working on a blog using Jekyll so I installed Ruby with this command from the Jekyll doc:

sudo apt-get install ruby ruby-dev build-essential

Then I installed the gems directory to my home folder. I tried out a lot of different themes and just run bundle install when my terminal said I was missing any dependencies. Now I have a lot of packages installed inside the gems folder. Is there a way for me remove unnecessary gems and start over without uninstall gems?

like image 203
Kingle Avatar asked Sep 02 '25 13:09

Kingle


1 Answers

It is highly recommend to not use system ruby but use a ruby version manager. One reason is that you won't have to use sudo before your gem commands.

If you want to remove all your current gems you should be able to just do

gem uninstall --all

But you might need to prepend it with sudo gem uninstall --all

If you intend to do any longer term work / multiple projects with ruby, I recommend using RVM. You can find detailed install instructions here

Some prefer rbenv however it's install instructions seem to be focused on MacOS, so if you're on linux, I dunno.

like image 149
lacostenycoder Avatar answered Sep 05 '25 07:09

lacostenycoder