AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 549424
Accepted
spuder
spuder
Asked: 2013-10-30 07:33:22 +0800 CST2013-10-30 07:33:22 +0800 CST 2013-10-30 07:33:22 +0800 CST

在任何来源中都找不到 rake-10.1.0

  • 772

我有一个通过 puppet 安装的 ruby​​ on rails 应用程序(gitlab)。

测试系统上的一切都运行良好,但生产会产生一个关于 rake 的错误

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

我已经验证 rake 实际上已安装

 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

我已经尝试过下面提到的解决方案,以允许共享 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'

我已经用尽了谷歌,所以我希望有更熟悉 ruby​​ 的人提供任何解决该错误的想法。Could not find rake-10.1.0 in any of the sources

我在解决此问题时的所有笔记都位于此处

ruby
  • 1 1 个回答
  • 2184 Views

1 个回答

  • Voted
  1. Best Answer
    spuder
    2013-10-30T12:13:23+08:002013-10-30T12:13:23+08:00

    dpkg -L 显示安装了 3 个版本的 ruby​​ 1.8 1.9.1 和 2.0。我卸载了所有 1.9.1 和 2.0(但留下了 1.8,因为它带有 puppet)。

    然后我再次运行puppet 模块以重新安装 ruby​​。现在一切正常。

    • 0

相关问题

  • 是否有 bash 等效于 ruby​​ 的“一些内容#{foo}”?

  • 乘客 + Nginx => 502 错误网关

  • 在 Apache + Passenger 上运行 Ruby on Rails 应用程序 == 占用大量内存

  • VMWare ESXi 3 有哪些自动化选项?

  • Postfix 的最佳设置和优化 VPS 上的自定义交付脚本

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve