Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to build GitLab from the Omnibus project in my Ubuntu 12.04 64-bit following this link

After issuing sudo apt-get install ruby ruby-bundler I downloaded the source from here and after exrtaction I made a bundle install --binstubs

I got the following error:

/usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8:in `require': no
such file to load -- rubygems (LoadError)   from
/usr/lib/ruby/vendor_ruby/bundler/rubygems_ext.rb:8     from
/usr/lib/ruby/vendor_ruby/bundler.rb:11:in `require'    from
/usr/lib/ruby/vendor_ruby/bundler.rb:11     from /usr/bin/bundle:4:in
`require'   from /usr/bin/bundle:4

What's my problem?

share|improve this question
Is that the full error output you see after running the bundle command? What Ruby version are you running? The instructions say that you need 1.9+, but Ubuntu 12.04 comes with 1.8.7. Make sure you follow instructions for Ubuntu 12.04 or set up a rbenv to install a newer Ruby version locally. – gertvdijk Dec 24 '13 at 18:45
yes sir, that's it – kamil Dec 24 '13 at 18:45
@gertvdijk You are right I upgraded ruby to v1.9 and it wokrs. You can put your comment as answer – kamil Feb 13 '14 at 8:49
up vote 1 down vote accepted

You have to upgrade your ruby version from 1.8.* to 1.9.*. To do that you can do it using RVM or without.

Method1: source
Installing Ruby 1.9.3 on Ubuntu 12.04 Precise Pangolin (without RVM)

If you want to make Ruby 1.9 the default do the following:

sudo apt-get update

Now install the packages

sudo apt-get install ruby1.9.1 ruby1.9.1-dev rubygems1.9.1 irb1.9.1 ri1.9.1 rdoc1.9.1 build-essential libopenssl-ruby1.9.1 libssl-dev zlib1g-dev

Make 1.9.* default

sudo update-alternatives --install /usr/bin/ruby ruby /usr/bin/ruby1.9.1 400 \
             --slave   /usr/share/man/man1/ruby.1.gz ruby.1.gz \
                            /usr/share/man/man1/ruby1.9.1.1.gz \
            --slave   /usr/bin/ri ri /usr/bin/ri1.9.1 \
            --slave   /usr/bin/irb irb /usr/bin/irb1.9.1 \
            --slave   /usr/bin/rdoc rdoc /usr/bin/rdoc1.9.1

choose your interpreter
changes symlinks for /usr/bin/ruby , /usr/bin/gem /usr/bin/irb, /usr/bin/ri and man (1) ruby

sudo update-alternatives --config ruby
sudo update-alternatives --config gem

Now try

ruby --version

Install Ruby on Ubuntu 12.04 LTS (Precise Pangolin) with RVM

Step One— Install Ruby with RVM

first update your sources lits

sudo apt-get update

Once that's done, we can start installing RVM, Ruby Version Manager.

If you do not have curl on your system, you can start by installing it:

sudo apt-get install curl

To install RVM, open terminal and type in this command:

\curl -L | bash -s stable

After it is done installing, load RVM. You may first need to exit out of your shell session and start up a new one.

source ~/.rvm/scripts/rvm

In order to work, RVM has some of its own dependancies that need to be installed. To automatically install them:

rvm requirements

You may need to enter your root password to allow the installation of these dependencies. On occasion the zlib package may be reported as missing. The RVM page describes the issue and the solution in greater detail here.

Step Two—Install Ruby

Once you are using RVM, installing Ruby is easy.

rvm install ruby

The latest ruby is now installed. However, since we accessed it through a program that has a variety of Ruby versions, we need to tell the system to use the version we just installed by default.

rvm use ruby --default
share|improve this answer
You are simply Awesome – kamil Feb 15 '14 at 11:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.