【问题标题】:Redmine keeps asking to run bundle installRedmine 一直要求运行 bundle install
【发布时间】:2017-02-08 12:49:47
【问题描述】:

我正在中国的服务器上执行 捆绑安装 Redmine,我已按照以下建议在 gemfile 和镜像中将 https://rubygems.org 替换为 https://gems.ruby-china.org/

gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/

也在我的 Gemfile 中,所以它看起来像这样:

#source 'https://rubygems.org'
source 'https://gems.ruby-china.org/'

但是在运行 bundle install 之后,实际上我正在重新安装,我收到以下消息:

您的捆绑包已锁定为 json (1.8.6),但该版本不能 在您的 Gemfile 中列出的任何来源中找到。如果你还没有 更改了来源,这意味着 json (1.8.6) 的作者已将其删除。 您需要将您的捆绑包更新为不同版本的 json (1.8.6) 尚未删除以便安装。 (Bundler::GemNotFound)

虽然我可以确认 1.8.6 是这样安装的:

gem list
...
json (1.8.6, 1.8.3)

像这样:

bundle show json
/home/redminedev/.rvm/gems/ruby-2.3.3/gems/json-1.8.6

这是 rvm list gemsets 列表:

rvm list gemsets

rvm gemsets

=> ruby-2.3.3 [ x86_64 ]
   ruby-2.3.3@global [ x86_64 ]

我尝试删除 .bundle 目录,删除 gemfile,清除并重新安装所有 gem... 没有任何效果。有什么建议吗?

【问题讨论】:

  • 你在使用 rvm 吗?
  • 是的,您可以根据帖子中列出的/.rvm/得出结论。
  • 可以运行这个命令“rvm list gemsets”并粘贴输出吗?
  • 我已经编辑了我的问题,添加了 rvm list gemsets
  • 现在对你有用了吗?

标签: ruby-on-rails ruby bundler redmine gemfile


【解决方案1】:

这最终解决了我的问题,感谢 atombender 在这里的回答: https://github.com/bundler/bundler/issues/5068#issuecomment-259580704

我已经完成了:

bundle install --deployment

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2015-03-12
    • 2013-01-05
    • 2016-06-01
    • 2014-08-07
    • 2016-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多