0

I'm trying to get up and running with ruby and the jekyll gem on my fresh instance of Ubuntu 16.04.

    usernamehere@usernamehere-hp:~/workspace/username.github.io$ ls -la /usr/local/bin/bundler
    -rwxr-xr-x 1 root root 498 Apr 18 18:18 /usr/local/bin/bundler
    usernamehere@usernamehere-hp:~/workspace/username.github.io$ ls -la /usr/local/bin/bundle
    -rwxr-xr-x 1 root root 497 Apr 18 18:18 /usr/local/bin/bundle
    usernamehere@usernamehere-hp:~/workspace/username.github.io$ ls -la /usr/bin/bundle
    -rwxr-xr-x 1 root root 590 Mar 13  2016 /usr/bin/bundle
    usernamehere@usernamehere-hp:~/workspace/username.github.io$ ls -la /usr/bin/bundler
    -rwxr-xr-x 1 root root 590 Mar 13  2016 /usr/bin/bundler

But I seem to have 2 or 4 copies of the ruby gem bundler installed. This is giving me conflicting things when I do things like:

bundle update vs sudo bundle update and bundle exec jekyll serve vs. sudo bundle exec jekyll serve

I'm also getting conflicting responses when I run bundle update vs bundler update vs sudo bundle update vs sudo bundler update.

What the heck is going on? I don't mind keeping only the ones in /usr/bin but I don't know if I should be using bundle or bundler or how to unsintall the entries in /usr/local/bin.

Any ideas?

1 Answer 1

1

I think you used sudo apt install ruby to get ruby in your system. Which unfortunately is outdated and not the best way to use ruby.

Try completely purging your current ruby and re-installing it using either rvm or rbenv

You'll find a step by step guide here.

PS: You should never run bundler as ROOT, Completely removing all gems from system.

7
  • My intention was to use the pre-existing ruby installation, if there is one, that comes with ubuntu. I wasn't keen on working with rvm or rbenv just to use jekyll since personally I'm not a fan of ruby and don't want to overcomplicate things just to write blog posts but it looks like I might not have a better option. Apr 19, 2017 at 16:12
  • I see. Did you follow these procedures ? Apr 20, 2017 at 9:29
  • I didn't unfortunately I just ran bundle exec jekyll serve until I stopped getting error messages. I've gotten rather comfortable with the package manager so I was confident that I would get it right. I was unfortunately not aware that there is a bundler and a bundle and I wasn't ready for the package manager to install things to /usr/local/bin when they already existed in usr/bin. Maybe that's my fault thought. Apr 20, 2017 at 16:18
  • 1
    Bundler is a gem, you can uninstall it by running gem uninstall bundler && sudo gem uninstall bundler, to remove all installed gems run gem uninstall --all && sudo gem uninstall --all to purge ruby run sudo apt purge ruby. Apr 21, 2017 at 3:02
  • 1
    If you're doing a clean install of jekyl, i would suggest to follow the digital ocean's guide, it's the most hassle free (no rvm, rbenv) way. Apr 21, 2017 at 3:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .