Назад | Перейти на главную страницу

Не удалось найти rake-10.1.0 ни в одном из источников

У меня есть приложение ruby ​​on rails (gitlab), которое устанавливается через марионетку.

Все в тестовой системе работает нормально, но продакшн выдает ошибку о граблях

Running /home/git/gitlab-shell/bin/check
Could not find rake-10.1.0 in any of the sources
Run bundle install to install missing gems.

Вот полный чек рейка:

root@gitlab:/home/git# sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.7.1 ? ... OK (1.7.1)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
update hook up-to-date? ... yes
update hooks in repos are links: ... 
Could not find rake-10.1.0 in any of the sources
Run `bundle install` to install missing gems.
gitlab-shell self-check failed
  Try fixing it:
  Make sure GitLab is running;
  Check the gitlab-shell configuration file:
  sudo -u git -H editor /home/git/gitlab-shell/config.yml
  Please fix the error above and rerun the checks.

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes
Number of Sidekiq processes ... 1

Checking Sidekiq ... 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? ... yes
projects have namespace: ... 
Spencer Owen / bar ... yes
Projects have satellites? ... 
Spencer Owen / bar ... can't create, repository is empty
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.8.4)

Checking GitLab ... Finished

Шаг «gitlab-shell check» эффективно запускает следующую команду. Если я запустил эту команду вручную, все пройдет.

root@gitlab:/home/git/gitlab# sudo -u git -H /home/git/gitlab-shell/bin/check 
Check GitLab API access: OK
Check directories and files: 
    /home/git/repositories: OK
    /home/git/.ssh/authorized_keys: OK

Я убедился, что грабли действительно установлены

 root@gitlab:/home/git/gitlab# gem install rake -v 10.1.0
 root@gitlab:/home/git/gitlab# bundle install

 root@gitlab:/home/git/gitlab# sudo -u git -H gem install rake -v 10.1.0
 root@gitlab:/home/git/gitlab# sudo -u git -H bundle install

Ruby установлен с альтернативами обновления

 root@gitlab:/home/git/gitlab# sudo -u git -H ruby --version
 ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
 root@gitlab:/home/git/gitlab# sudo -u git -H ls -l `which ruby`
 lrwxrwxrwx 1 root root 22 Oct  8 20:26 /usr/bin/ruby -> /etc/alternatives/ruby

 root@gitlab:/home/git/gitlab# sudo -u git -H gem --version
 2.1.10
 root@gitlab:/home/git/gitlab# sudo -u git -H ls -l `which gem`
 lrwxrwxrwx 1 root root 21 Oct 10 20:50 /usr/bin/gem -> /etc/alternatives/gem

Я пробовал решение, упомянутое ниже, чтобы разрешить общие драгоценные камни https://stackoverflow.com/questions/19284914/bundle-exec-fails-with-could-not-find-rake-10-1-0-in-any-of-the-sources
https://stackoverflow.com/questions/18978002/could-not-find-rake-with-bundle-exec

root@gitlab:/home/git/gitlab# cat /home/git/gitlab/.bundle/config 
---
BUNDLE_FROZEN: '1'
BUNDLE_PATH: vendor/bundle
BUNDLE_WITHOUT: development:test:postgres
BUNDLE_DISABLE_SHARED_GEMS: '1'

Я исчерпал возможности Google, поэтому надеюсь, что кто-то, более знакомый с Ruby, предложит какие-либо идеи, как решить эту ошибку. Could not find rake-10.1.0 in any of the sources

Все мои заметки по устранению этой проблемы расположен здесь

dpkg -L показал, что было установлено 3 версии ruby ​​1.8, 1.9.1 и 2.0. Я удалил все 1.9.1 и 2.0 (но оставил 1.8, потому что он идет с марионеткой).

Затем я запустил марионеточный модуль снова переустановить рубин. Теперь все работает.