在Rails应用程序上安装捆绑包时出错

时间:2014-11-25 10:30:50

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

我尝试使用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

3 个答案:

答案 0 :(得分: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

答案 1 :(得分:0)

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

如果未显示任何内容,请键入gem install bundler

来安装bundler

之后尝试bundle install

答案 2 :(得分:0)

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

请按照以下链接获取更多信息。

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