[英]ruby: usr/bin/environment ruby no such file or directory
I am trying to install gitlab
. 我正在尝试安装gitlab
。 I installed postgresql
and I checked out the source. 我安装了postgresql
并签出了源代码。 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. 我已将ruby bin添加到我的类路径中。 Below is the content of environement file under /env/ 以下是/ 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. 我以根用户身份安装了rmv。 So the rmv installation directory is usr/local/rmv If I check rmv list it shows ruby2.1.1 as default. 因此,rmv安装目录为usr / local / rmv如果检查rmv列表,则默认显示ruby2.1.1。
it seems you haven't installed ruby correctly. 看来您没有正确安装ruby。
so first remove rvm 所以先删除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 接下来,安装ruby:尝试使用几个选项来安装ruby
per user using rvm: 使用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 有关更多信息,请参见从源代码安装Ruby
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.