【问题标题】:Error with bundle install on Rails app在 Rails 应用程序上安装包时出错
【发布时间】:2014-11-25 10:30:49
【问题描述】:

我正在尝试使用 this tutorial 在 Windows 上安装 Ruby on Rails。

我成功完成了第 13 步之前的所有步骤:

再次运行bundle install

这就是我得到的:

C:\Users\user1>gem install rmagick --platform=ruby -- --with-opt-dir=C:\RailsIns
taller\ImageMagick
Fetching: rmagick-2.13.3.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Please report any bugs. See https://github.com/gemhome/rmagick/compare/RMagick_2
-13-2...master and https://github.com/rmagick/rmagick/issues/18
Successfully installed rmagick-2.13.3
1 gem installed
Installing ri documentation for rmagick-2.13.3...
Installing RDoc documentation for rmagick-2.13.3...

C:\Users\user1>bundle install
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Co
uld not find bundler (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.
5, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.5, rmagick-2.13.3] (Gem::LoadError)
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `
to_spec'
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
        from C:/RailsInstaller/Ruby2.0.0/bin/bundle:22:in `<main>'

可能是什么问题?

更新:

运行后gem install bundler:

C:\Users\user1>gem list bundler

*** LOCAL GEMS ***

bundler (1.7.7)

C:\Users\user1>bundle install
Could not locate Gemfile

【问题讨论】:

  • 您的路径是这样设置的吗:set CPATH=C:\Program Files\ImageMagick-6.7.7-Q16\includeset LIBRARY_PATH=C:\Program Files\ImageMagick-6.7.7-Q16\lib 这是从之前对您的一个问题的回答中摘录的。
  • 是的,我做了:C:\Users\user1>set CPATH=C:\RailsInstaller\ImageMagick\include C:\Users\user1>set LIBRARY_PATH=C:\RailsInstaller\ImageMagick\lib跨度>
  • gem install bundler?
  • C:\Users\user1>gem install bundler Fetching: bundler-1.7.7.gem (100%) 成功安装了 bundler-1.7.7 1 个 gem 安装了 bundler-1.7.7 的 ri 文档... 为 bundler-1.7.7 安装 RDoc 文档... C:\Users\user1>bundle install 找不到 Gemfile

标签: ruby-on-rails ruby windows bundle-install


【解决方案1】:

多亏了这个,我解决了这个问题:

bundle install returns "Could not locate Gemfile"

C:\Users\user1>cd C:/xampp/htdocs/dev-ruby/redmine

C:\xampp\htdocs\dev-ruby\redmine>bundle install

【讨论】:

    【解决方案2】:

    我认为您应该使用$gem list bundler 甚至$which bundle 来检查是否安装了捆绑程序

    如果未显示任何内容,请输入 gem install bundler 安装 bundler

    然后尝试bundle install

    【讨论】:

      【解决方案3】:

      您需要在您的窗口系统上安装 rmagic 库。

      请点击链接了解更多信息。

      http://www.redmine.org/projects/redmine/wiki/HowTo_install_rmagick_gem_on_Windows

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-05-29
        • 1970-01-01
        • 2010-09-19
        • 1970-01-01
        • 2018-10-07
        相关资源
        最近更新 更多