0

我制作了一个新的 rails 3.2.8 应用程序并添加了:

gem "rmre", "~> 0.0.4"

到这个新的 gemfile:

source 'https://rubygems.org'

gem 'rails', '3.2.8'

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

gem 'mysql2'


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '~> 3.2.3'
  gem 'coffee-rails', '~> 3.2.1'

  # See https://github.com/sstephenson/execjs#readme for more supported runtimes
  # gem 'therubyracer', :platforms => :ruby

  gem 'uglifier', '>= 1.0.3'
end

gem 'jquery-rails'

gem "rmre", "~> 0.0.4"

# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'

# To use Jbuilder templates for JSON
# gem 'jbuilder'

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

# Deploy with Capistrano
# gem 'capistrano'

# To use debugger
# gem 'debugger'

运行 bundle install 产生:

Bundler could not find compatible versions for gem "erubis":
  In Gemfile:
    rmre (~> 0.0.4) ruby depends on
      erubis (~> 2.6.6) ruby

    rails (= 3.2.8) ruby depends on
      erubis (2.7.0)

我尝试注释掉版本号,甚至删除与资产管理相关的 gem。不过,我似乎无法得出在这里工作的 gem 版本的组合。这是我第一次遇到这种情况,我不确定我还能做些什么来尝试使用至少 3 点左右的 rails 版本的 rmre gem。

有没有一种聪明的方法来在这里寻找可行的依赖解决方案?如果没有满足推荐依赖的gem版本配置,有没有最不坏的方法去追求?

非常感谢!

4

2 回答 2

0

You might try contacting the rmre gem author to see if they would be willing to loosen the dependency restriction, so that it's not tied to such a narrow erubis version. Forward compatibility is part of what gem authors need to maintain if they want their gem to continue to work with the latest versions of rails. – normalocity Nov 2 at 1:31
.
.
Worked.

于 2012-11-09T17:03:56.887 回答
0

Download the zip file from the page. Then execute the gem command. Worked for me. Incredible program.

于 2013-01-18T08:43:26.903 回答