我正在尝试将我的所有应用程序从ruby 1.8.7升级到1.9.3。
有些应用程序正常运行。但是,我有一个rails 3.0.x站点,当我运行它或使用bundle install时,它一直在抛出关于错误的bundler版本的错误。
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
refinerycms (~> 0.9.8.5) ruby depends on
bundler (~> 1.0.0) ruby
Current Bundler version:
bundler (1.2.3)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
我安装了捆绑器1.2.3(乘客需要)和捆绑器1.0.22。但是,它不会让我运行bundle install
,并且运行该站点也会抛出一个错误,即rails 3.0需要旧版本的bundler。
更新: 我使用旧版本的bundler安装了我的宝石:
bundle _1.0.3_ install
就安装宝石而言,此工作正常,但是当我运行网站时,Passenger仍然抱怨我使用的是捆绑器1.2.3并且它需要(〜> 1.0.0)。不~~意思是“大于1.0”?我在Ruby 1.8.7下没有任何这些问题。
这是我的Gemfile。如您所见,我尝试在我的gemfile中包含旧版本的bundler并排除。两种方式都不奏效。 :(
source 'http://rubygems.org'
#gem 'bundler', '1.0.3'
gem 'rails', '3.0.0'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2', '0.2.6'
# 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
# REFINERY CMS ================================================================
# Specify the Refinery CMS core:
gem 'refinerycms', '~> 0.9.8.5'
# Specify additional Refinery CMS Engines here (all optional):
gem 'refinerycms-inquiries', '~> 0.9.8.10'
gem 'refinerycms-search', '~> 0.9.8'
gem "refinerycms-news", '~> 0.9.9'
# Add i18n support (optional, you can remove this if you really want to).
gem 'refinerycms-i18n', '~> 0.9.8.7'
# Figure out how to get RMagick:
rmagick_options = {:require => false}
rmagick_options.update({
:git => 'git://github.com/refinerycms/rmagick.git',
:branch => 'windows'
}) if Bundler::WINDOWS
# Specify a version of RMagick that works in your environment:
gem 'rmagick', '~> 2.12.2', rmagick_options
# END REFINERY CMS ============================================================
# USER DEFINED
# END USER DEFINED
gem 'validates_timeliness', '~> 3.0.0'
engine_path = File.join(File.dirname(__FILE__), 'vendor/engines')
#puts engine_path
gem 'refinerycms-venues', '1.0', :path => "./vendor/engines", :require => 'venues'
gem 'refinerycms-events', '1.0', :path => './vendor/engines', :require => 'events'
gem 'refinerycms-available_spaces', '1.0', :path => './vendor/engines', :require => 'available_spaces'
gem 'refinerycms-contents', '1.0', :path => 'vendor/engines', :require => 'contents'
gem 'refinerycms-news_alerts', '1.0', :path => 'vendor/engines', :require => 'news_alerts'
如果我安装了更新版本的Bundler,它就像Rails 3.0一样不允许我运行该网站,但这看起来很疯狂。拥有更新版本的捆绑包会破坏旧网站吗?