【问题标题】:Unable to 'bundle install' RoR 3.0.1无法“捆绑安装”RoR 3.0.1
【发布时间】:2012-05-05 05:03:40
【问题描述】:

这是我的屏幕截图的链接。 http://imgur.com/bbLud(所以不允许菜鸟发照片)

问题。

尝试捆绑安装并不断抛出“此版本需要不同版本的捆绑器”错误。所以我卸载了当前版本,检查了我的 bundler 版本,它仍然出现。我再次卸载它,它告诉我它不存在。有人可以请出一个想法。

编辑:Gemfile 的内容

source 'http://rubygems.org'

gem 'rails', '3.0.1'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', '1.0.0', :require => 'sqlite3'

# Use unicorn as the web server
# gem 'unicorn'

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'ruby-debug'

# Bundle the extra gems:
# gem 'bj'
# gem 'nokogiri'
# gem 'sqlite3-ruby', :require => 'sqlite3'
# gem 'aws-s3', :require => 'aws/s3'

# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
# group :development, :test do
#   gem 'webrat'
# end

【问题讨论】:

  • 你能发布你的gemfile的内容吗?也只需尝试运行gem install bundler 以确保您拥有最新版本。
  • 添加内容。我运行了 gem install bundler。它给了我 1.1.3

标签: ruby-on-rails ruby gem bundler iterm


【解决方案1】:

尝试使用gem install bundler --version "1.0.0"手动安装bundler 1.0.0,然后再次运行bundle install

更新:查看另一个答案中的screenshot,您似乎已经拥有bundler 1.0.0,顺便说一句,无论如何都要试一试。看来 bundle 命令仍然指向较新的版本,如果你运行 bundle -v 会得到什么?

【讨论】:

  • imgur.com/BIt0M 这是最新的图片。我卸载了除 1.0.0 之外的所有版本,它仍然告诉我我当前的版本是 1.1.3,即使当我卸载 1.1.3 版本时它说它不存在。
  • 您是否关闭了终端并再次尝试?我猜环境不是最新的,它仍然指向更新的、已卸载的捆绑程序版本。
  • 我确实尝试过。我刚刚经历并再次安装了所有东西。似乎有很长的路要走,但它奏效了。
【解决方案2】:

屏幕截图中显示的错误是,您使用的是 rails 3.0.1。

无版本卸载

gem uninstall bundler

它会询问您要删除哪个版本,然后将其删除,选择 1.3.1 进行卸载,再次进行捆绑安装,如果仍然显示错误,请在此处发布。

【讨论】:

  • imgur.com/aiTaB 表现得很奇怪。它已卸载但仍然抛出错误。
  • 粘贴bundle exec gem listgem list的输出,同时卸载你不需要的其他版本的bundle
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-11-29
  • 1970-01-01
相关资源
最近更新 更多