【问题标题】:Bundler not recognizing local gem pathBundler 无法识别本地 gem 路径
【发布时间】:2017-06-20 21:42:23
【问题描述】:

对于当前服务器上的站点,运行 bundle install --path vendor/bundle --full-index 没有问题。但是,当我在新服务器(相同版本的 Bundler)上为同一个站点运行此程序时,我得到:

NoMethodError: undefined method `spec' for nil:NilClass
An error occurred while installing userstamp (2.0.2), and Bundler cannot continue.
Make sure that `gem install userstamp -v '2.0.2'` succeeds before bundling.

特定的 gem 在 Gemfile 中是这样定义的:

gem 'userstamp', '2.0.2', path: "vendor/local_gems/userstamp"

宝石就在那里。这意味着 Bundler 忽略了 Gemfile 中的 path 选项。有关如何进行的任何建议?

【问题讨论】:

  • 尝试强制 ruby​​gems 版本在两个系统中相同。 gem update --system version_from_working_system
  • 成功了,非常感谢!

标签: ruby-on-rails ruby rubygems bundler


【解决方案1】:
  gem update --system version_from_working_system

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-05-25
    • 2016-09-11
    • 2015-04-19
    • 1970-01-01
    • 2019-07-20
    • 2014-03-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多