Reputation: 187
I have set up Git server on Mac using the commands as specified at https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/requirements.md.
I am able to get the login page also when I hit the IP in browser. Others are also able to access my server, but when I clone using the command:
git clone [email protected]:root/mobilesecurityproduct.git
Cloning into 'mobilesecurityproduct'...
I get the following error
env: ruby: No such file or directory
fatal: The remote end hung up unexpectedly
I checked the gitlab-shell
for the env path and tried to replace it with output of which ruby
, but I get the same error.
Can anyone help me out with this?
Upvotes: 0
Views: 1217
Reputation: 34318
Ok, since you said you used rvm to install Ruby I assume you installed it the standard way, which means you installed it only for personal use under your own home directory.
The gitlab user will not have access to your home directory and therefore it cannot run the Ruby executable from there.
You will need to install Ruby system-wide.
In fact this is step 2 in the installation instructions:
https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md#2-ruby
mkdir /tmp/ruby && cd /tmp/ruby
curl --progress http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | tar xz
cd ruby-1.9.3-p392
./configure
make
sudo make install
sudo gem install bundler --no-ri --no-rdoc
Following those instructions should fix it.
EDIT
As tadman pointed out using Homebrew might be a less intrusive way to install Ruby system wide on a Mac: Installing Ruby with Homebrew
Upvotes: 1