简体   繁体   中英

ruby: usr/bin/environment ruby no such file or directory

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.

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:
$ 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
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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM