1

I am trying to install gitlab. I installed postgresql and I checked out the source. When I try to install by this command

sudo -u git -H./bin/install

I am getting

usr/bin/env ruby no such file or directory error

I have added ruby bin to my classpath. Below is the content of environement file under /env/

PATH=/usr/local/rvm/rubies/ruby-2.1.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/oraclebase/app/oracle/product/12.1.0/dbhome_1/bin
ORACLE_HOME=/oraclebase/app/oracle/product/12.1.0/dbhome_1
ORACLE_SID=orcl
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
ruby=/usr/local/rvm/rubies/ruby-2.1.1/bin

I installed rmv as root. So the rmv installation directory is usr/local/rmv If I check rmv list it shows ruby2.1.1 as default.

Uri Agassi
  • 36,848
  • 14
  • 76
  • 93
user123
  • 518
  • 12
  • 24

1 Answers1

0

it seems you haven't installed ruby correctly.

so first remove rvm

$ rvm implode
Are you SURE you wish for rvm to implode?
This will recursively remove /Users/gaurish/.rvm and other rvm traces?
(anything other than 'yes' will cancel) > yes
Removing rvm-shipped binaries (rvm-prompt, rvm, rvm-sudo rvm-shell and rvm-auto-ruby)
Removing rvm wrappers in /Users/gaurish/.rvm/bin
Hai! Removing /Users/gaurish/.rvm

next, install ruby: try are couple of options to install ruby

per user using rvm:
$ \curl -sSL https://get.rvm.io | bash -s stable --ruby
System-wide global

you can compile yourself from source:

$ wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.1.tar.gz
$ tar xf ruby-2.1.1.tar.gz
$ cd ruby-2.1.1/
$ ./configure --disable-install-doc
$ make && make install

if everything went well, you should have a system-wide ruby available:

$ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]

For more see installing ruby from source

CuriousMind
  • 33,537
  • 28
  • 98
  • 137