1

I am trying to install Jekyll in a VM for my web course and it required ruby >= 2.0.0.

I've gone through installing RVM and using this to install the desired version of ruby, but I then get the following:

vagrant@precise32:~/.rvm/bin$ bash rvm list

 rvm rubies

    ruby-2.1.1 [ i686 ]
 =* ruby-2.2.1 [ i686 ]

  # => - current
  # =* - current && default
  #  * - default

 vagrant@precise32:~/.rvm/bin$ ruby -v 
 ruby 1.8.7 (2011-06-30
 patchlevel 352) [i686-linux] 

 vagrant@precise32:~/.rvm/bin$ sudo gem
 install jekyll ERROR:  Error installing jekyll:jekyll requires Ruby version >= 2.0.0. 

 vagrant@precise32:~/.rvm/bin

I don't understand why it still thinks it is using version 1.8.7, as it confirms that it has installed 2.2.1.

I have done the following:

  1. Use sudo chown to change ownership of the .gnupg folder recursively to vagrant (my system user) as defined here.

  2. Install RVM following the instructions here.

  3. Installed the version (2.2.1) of ruby using these instructions (https://rvm.io/rubies/installing).

  4. Tried to install Jekyll using sudo gem install jekyll, but I get an error saying that I need ruby version 2.0 or higher.

I'm not a developer, this is an introductory web development course. Also please excuse the corrupt link, I can't post more than 2.

Update: I think I might need to do something as described here: How do I change my Ruby version using RVM?.

Also - although I installed RVM, I originally installed it using sudo apt-get which corrupted it. I uninstalled that, and ran the most recent install with curl. To use it I have to navigate to the directory and use "bash rvm list"

Community
  • 1
  • 1
Brookelyn
  • 11
  • 3

2 Answers2

0

Add following two lines:

export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*

to your $HOME/.profile file and restart a shell.

Aleksei Matiushkin
  • 119,336
  • 10
  • 100
  • 160
0

It seems your machine is using Its own instead by RVM.

1: rvm list # Listing install rubies will you get versions of ruby which is installed by RVM

2: rvm use < ruby-version > # for instances ruby-1.9.3-p125

3: bundle install

4: Tried to install Jekyll using sudo gem install jekyll, but I get an error saying that I need ruby version 2.0 or higher.

For that you could try Installing Jekyll on Ubuntu 14.04

Hope this help you !!!

Community
  • 1
  • 1
Gupta
  • 8,882
  • 4
  • 49
  • 59