2

after upgrading to 14.04, Ruby was downgraded to 1.8.3 so I tried to upgrade using the following commands.

sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.1
rvm use 2.1.1 --default
ruby -v

After that i ran

sudo gem install jekyll

It was installed sucessfully but, I am not able to use it is says

bash: /usr/local/bin/jekyll: /usr/bin/ruby1.9.1: bad interpreter: No such file or directory
Anandu
  • 23
  • 3

2 Answers2

1

Install ruby1.9.1-dev for Jekyll

sudo apt-get install ruby1.9.1-dev

If you have other version of Ruby, remove it first.

i.e for Ruby 2.0

sudo apt-get purge ruby2.0*
Harsh Vakharia
  • 349
  • 2
  • 6
  • Ya, you have to build it from source, first download [Ruby 2.1.1](http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz), extract it, and `./configure`, then `make`, after it, do `sudo make install`. See [Installing Ruby](https://www.ruby-lang.org/en/installation/#building-from-source) for more details. – Harsh Vakharia May 04 '14 at 08:48
0

It appears that ruby might not be installed at the searched location. Try:

$ sudo apt-get install ruby

Also you gave a command that you tried, "ruby -v". Can you give us the output of that command?

L. D. James
  • 24,768
  • 10
  • 68
  • 116