Can not start Web server unicorn gives "cannot load such file -- config/unicorn.rb"
Created by: xadd
I'm installing a gitlab on a Debian server. I follow the installation guide step by step, and when i ran
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
it gives me such info:
Checking Environment ...
gitlab user is in git group? ... yes
Has no "-e" in ~git/.profile ... yes
Git configured for gitlab user? ... yes
Has python2? ... yes
python2 is supported version? ... yes
Checking Environment ... Finished
Checking Gitolite ...
Using recommended version ... yes
Repo umask is 0007 in .gitolite.rc? ... yes
Allow all Git config keys in .gitolite.rc ... yes
Config directory exists? ... yes
Config directory owned by git:git ... yes
Config directory access is drwxr-x---? ... yes
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwsrws---? ... yes
Can clone gitolite-admin? ... Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
yes
Can commit to gitolite-admin? ... yes
post-receive hook exists? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ... can't check, you have no projects
Git config in repos: ... can't check, you have no projects
Checking Gitolite ... Finished
Checking Resque ...
Running? ... no
Try fixing it:
sudo service gitlab restart
or
sudo /etc/init.d/gitlab restart
For more information see:
doc/install/installation.md in section "Install Init Script"
see log/resque.log for possible errors
Please fix the error above and rerun the checks.
Checking Resque ... Finished
Checking GitLab ...
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
Try fixing it:
Redownload the init script
For more information see:
doc/install/installation.md in section "Install Init Script"
Please fix the error above and rerun the checks.
Projects have satellites? ... can't check, you have no projects
Checking GitLab ... Finished
Everything is green except the "Running" and "Init script up-to-date" part. So i thought i should start the server manully. And when i ran
sudo service gitlab start
it gives me:
root is not in the sudoers file. This incident will be reported.
root is not in the sudoers file. This incident will be reported.
Gitlab service started
BUT gitlab is not running when i check the result of sudo ps aux So i figure there must be something wrong and ran this:
sudo bundle exec unicorn_rails config/unicorn.rb -E production
and there are repeating errors info like this:
/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn.rb:46:in `require': cannot load such file -- config/unicorn.rb (LoadError)
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn.rb:46:in `block in builder'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:700:in `call'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:700:in `build_app!'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:573:in `init_worker_process'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:593:in `worker_loop'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:491:in `spawn_missing_workers'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:502:in `maintain_worker_count'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/lib/unicorn/http_server.rb:276:in `join'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/gems/unicorn-4.4.0/bin/unicorn_rails:209:in `<top (required)>'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `load'
from /home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/bin/unicorn_rails:23:in `<main>'
but config/unicorn.rb does exist in /home/gitlab/gitlab. What's happening? What am i missing? and why is vendor PATH "vendor/bundle/ruby/1.9.1" instead of 1.9.3? Does that matter? (i noticed there was a ruby 1.9.1 on the server before, but i did download the 1.9.3 p327 and bundler according to installation.md exactly.)