【问题标题】:Could not find gem 'rubytree (~> 0.5.2) ruby' while installing ChiliProject on Debian在 Debian 上安装 ChiliProject 时找不到 gem 'rubytree (~> 0.5.2) ruby​​'
【发布时间】:2011-10-18 17:50:31
【问题描述】:

我正在尝试在服务器上安装 chiliproject,遵循 -well done- 文档我遇到了这个错误

Could not find gem 'rubytree (~> 0.5.2) ruby' in any of the gem sources listed in your Gemfile.

我做了一个 gem install ruby​​tree

我收到这条消息

========================================================================

 Thank you for installing rubytree.

              WARNING: SIGNIFICANT API CHANGE in 0.8.0 !
              ------------------------------------------

 Please note that as of 0.8.0 the CamelCase method names are DEPRECATED.

 The new method names follow the ruby_convention (separated by '_').

 The old CamelCase methods still work (a warning will be displayed),
 but may go away in the future.

 Details of the API changes are documented in the API-CHANGES file.

========================================================================
Successfully installed rubytree-0.8.1
1 gem installed
Installing ri documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found
Installing RDoc documentation for rubytree-0.8.1...
file 'COPYING,API-CHANGES' not found

也就是说安装成功了。那么为什么我会收到错误消息? 如果错误来自 API 更改,我该如何请求 ruby​​tree gem 的 0.5.2 版本?

当我做一个gem list --local | grep 'rubytree' 我有这个输出rubytree (0.8.1)

那么为什么系统说找不到 gem 'rubytree' 呢?

感谢您的帮助,

【问题讨论】:

    标签: ruby gem bundle chiliproject


    【解决方案1】:

    根据您使用的 Rails 版本(听起来您使用的是相对较新的版本,如果它提示您输入 Gemfile),那么您需要使用 Bundler 来管理您的 gem。

    尝试编辑您的 Gemfile,添加一个新行,内容如下:

    gem "rubytree", "< 0.6"
    

    然后打开一个控制台,输入这个命令

    bundle install
    

    这应该可以解决您的问题,但如果您在运行命令时仍然遇到错误,请尝试在命令之前输入bundle exec(即rails server 变为bundle exec rails server)。

    【讨论】:

    • ChiliProject 已经使用了 bundler 并指定了rubytree ~&gt; 0.5.2。我们目前相当坚持这一点......
    • 如果你没有注意到,rubytree
    • 是的,但鉴于您提议的编辑并没有做任何我们还没有的事情。对不起,如果这听起来有点粗鲁......
    【解决方案2】:

    目前,我们需要 rubytree 完全在版本 0.5.2 或 0.5.3 中,如我们的 Gemfile 中指定的 0.8.1。您手动安装的版本无法满足该要求,这正是错误消息所述。

    错误消息中的文字ruby 似乎有点奇怪。您能否确保您系统上的源代码中的Gemfile 完全不变?另外,能否请您删除任何用户安装的插件并重试?另外,您在哪个操作系统上使用哪个 ruby​​(类型和版本)?

    【讨论】:

    • 我没有打开 Gemfile 来自己编辑它。对于 ruby​​ 版本, ruby​​ -v 输出是这个 ruby​​ 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] for the OS是 Debian 6.0。 AI 没有安装插件。我从一开始就拿了这个文件,一直跟着它,直到我到达那里。我之前没有在这台服务器上安装过 ruby​​。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多