ruby-on-rails - 即使安装了bundler-1.1.3,"bundle install"也会失败

标签 ruby-on-rails bundler

我正在尝试运行“bundle install”,尽管我安装了 gem bundle 程序,但在查找适当的 gemfile 方面似乎存在问题。我不知道从这里该做什么。当我运行“bundle 安装”时,我得到以下信息:

C:\Users\User1\Sites\simple_cms>bundle install
Fetching gem metadata from http://rubygems.org/.........
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 3.0.0) x86-mingw32 depends on
      bundler (~> 1.0.0) x86-mingw32

  Current Bundler version:
    bundler (1.1.3)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

然后我安装了 bundle 程序 gem,它看起来安装得很好。

C:\Users\User1\Sites\simple_cms>gem install bundler
Successfully installed bundler-1.1.3
1 gem installed
Installing ri documentation for bundler-1.1.3...
Installing RDoc documentation for bundler-1.1.3...

但是即使 bundle 程序 gem 的安装成功,“bundle 安装”仍然失败:

C:\Users\User1\Sites\simple_cms>bundle install
Fetching gem metadata from http://rubygems.org/.........
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 3.0.0) x86-mingw32 depends on
      bundler (~> 1.0.0) x86-mingw32

  Current Bundler version:
    bundler (1.1.3)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?

当我运行“gem list”时, bundler 肯定在那里:

C:\Users\User1\Sites\simple_cms>gem list

*** LOCAL GEMS ***

actionmailer (3.2.3)
actionpack (3.2.3)
activemodel (3.2.3)
activerecord (3.2.3)
activeresource (3.2.3)
activesupport (3.2.3)
arel (3.0.2)
bigdecimal (1.1.0)
builder (3.0.0)
bundler (1.1.3)
coffee-rails (3.2.2)
coffee-script (2.2.0)
coffee-script-source (1.3.1)
erubis (2.7.0)
execjs (1.3.1)
hike (1.2.1)
i18n (0.6.0)
io-console (0.3)
journey (1.0.3)
jquery-rails (2.0.2)
json (1.7.0, 1.5.4)
mail (2.4.4)
mime-types (1.18)
minitest (2.5.1)
multi_json (1.3.4)
mysql2 (0.3.11 x86-mingw32)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.2)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.2.3)
railties (3.2.3)
rake (0.9.2.2)
rdoc (3.12, 3.9.4)
rubygems-update (1.8.24)
sass (3.1.16)
sass-rails (3.2.5)
sprockets (2.1.3)
sqlite3 (1.3.6 x86-mingw32)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.33)
uglifier (1.2.4)

C:\Users\User1\Sites\simple_cms>

最佳答案

尝试删除您的Gemfile.lock。然后运行bundle check并查看输出。它可能会要求您再次运行bundle install

关于ruby-on-rails - 即使安装了bundler-1.1.3,"bundle install"也会失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10486884/

相关文章:

bash - 如何强制 ruby​​gems 或 shell 使用特定版本的 gem 可执行文件?

iOS “Add to Home Screen” - 文件下载将用户踢出

html - Rails - 使用 h() 转义 HTML 并排除特定标签

ruby - 通过 ruby​​gems-bundler 在没有 `bundle exec` 的情况下执行

ruby-on-rails-3 - 为什么在打包程序之外运行 Guard 很危险?

ruby-on-rails - 自定义 gem 依赖项未添加到 Gemfile.lock?

rubygems - 如何使用 systemd/systemctl 启动 Unicorn?

ruby-on-rails - 在 Heroku 上正确配置 Unicorn 和 Sidekiq

ruby-on-rails - 如何生成一份报告,显示我在 Rails 3.2、Ruby 1.9 中运行最慢的测试?

ruby-on-rails - rails : Restrict API requests to JSON format