本文介绍了缺少宝石可以的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Bundler could not find compatible versions for gem "railties":
  In Gemfile:
    rails (= 3.2.3) ruby depends on
      railties (= 3.2.3) ruby

    jquery-rails (= 2.0.0) ruby depends on
      railties (3.2.5)

尝试捆绑安装"时出现错误消息,这是我的gemfile

I have got that error message while trying to "bundle install" and here is my gemfile

source 'https://rubygems.org'

gem 'rails', '3.2.3'

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

group :development do
    gem 'sqlite3', '1.3.5'
end

gem 'json'

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


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

  gem 'uglifier', '>= 1.2.3'
end

gem 'jquery-rails', '2.0.0'

# 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 'ruby-debug'

这是红宝石版本

ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

在进行所有捆绑检查"之前,会丢失以下宝石

Before all of that my "bundle check" results in the following missing gems

The following gems are missing
 * tilt (1.3.3)
 * mime-types (1.18)
 * mail (2.4.4)
 * sass-rails (3.2.5)

请有人帮我解决这个小问题.谢谢

Someone could help me resolve this little problem please. Thank you

推荐答案

在当前的组合捆绑器中,无法同时为rails和jquery-rails找到匹配版本的railties.

With the current combination bundler can't find a matching version of railties for both rails and jquery-rails at the same time.

解决方案

要么:

gem 'jquery-rails', '2.0.1'

或者:

gem 'jquery-rails', '~> 2.0.1'

这篇关于缺少宝石可以的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 09:25