对于我的应用程序,我正在尝试将 Ruby on Rails 从版本升级3.2.13
到4.0.0
并且在安装/更新某些 gem(通过使用 Bundler)时遇到麻烦,特别是globalize3 gem。我正在运行 Ruby 2.0.0-p247
。
鉴于我Gemfile
的是:
gem 'rails', '4.0.0'
gem 'globalize3', github: 'svenfuchs/globalize3', branch: 'rails4'
gem 'delayed_job', :git => 'git://github.com/collectiveidea/delayed_job.git', :branch => 'master'
gem 'delayed_job_active_record', :git => 'git://github.com/collectiveidea/delayed_job_active_record.git', :branch => 'master'
# Added these gems to help with the transition to rails4:
gem 'protected_attributes'
gem 'rails-observers'
gem 'actionpack-page_caching'
gem 'actionpack-action_caching'
gem 'activerecord-deprecated_finders'
当我bundle install
在终端窗口中运行命令时
然后我得到以下输出:
Updating git://github.com/svenfuchs/globalize3.git
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
globalize3 (>= 0) ruby depends on
activerecord (~> 3.0) ruby
delayed_job_active_record (>= 0) ruby depends on
activerecord (4.0.0)
Bundler could not find compatible versions for gem "rails":
In Gemfile:
globalize3 (>= 0) ruby depends on
rails (~> 3) ruby
rails (4.0.0)
当我bundle update
在终端窗口中运行命令时
然后我得到以下输出:
Updating git://github.com/collectiveidea/delayed_job.git
Updating git://github.com/collectiveidea/delayed_job_active_record.git
Updating git://github.com/svenfuchs/globalize3.git
Fetching gem metadata from https://rubygems.org/.......
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "rails":
In Gemfile:
globalize3 (>= 0) ruby depends on
rails (~> 3) ruby
rails (4.0.0)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
globalize3 (>= 0) ruby depends on
railties (~> 3.0) ruby
coffee-rails (~> 4.0.0) ruby depends on
railties (4.0.0)
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
rails (= 4.0.0) ruby depends on
actionpack (= 4.0.0) ruby
actionpack-action_caching (>= 0) ruby depends on
actionpack (4.0.0.rc2)
我该如何解决这个问题?gem真的globalize3
与 Ruby on Rails 4 兼容吗?等待升级到 Ruby on Rails 4 是否可取?
注意:我看到了#415 Upgrading to Rails 4 railscast 并且我在互联网上进行了很多搜索(最合理的讨论是“ Globalize3 does not work with Rails4 ”),但我仍然遇到了麻烦。