得到错误'Bundler无法找到gem“railties”的兼容版本

时间:2013-10-30 19:09:02

标签: ruby-on-rails ruby rubygems gem

我正在关注Michael Hartl的ruby on rails教程,在部署我的第一个应用程序时,我收到以下错误:

Bundler could not find compatible versions for gem "railties":

  In Gemfile:

    rails (= 4.0.0) x86-mingw32 depends on
      railties (= 4.0.0) x86-mingw32

    sass-rails (= 4.0.0) x86-mingw32 depends on
      railties (4.0.1.rc3)

My Gemfile如下所示:

source 'https://rubygems.org'

ruby '1.9.3'

gem 'rails', '4.0.0'

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

gem 'sass-rails',   '4.0.0'

gem 'uglifier', '2.1.1'

gem 'coffee-rails', '4.0.1'

gem 'jquery-rails', '3.0.4'

gem 'turbolinks'

gem 'jbuilder', '~> 1.2'

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.

  gem 'sdoc', require: false

end

知道我在这里缺少什么吗?

2 个答案:

答案 0 :(得分:2)

我会再次重新安装railties gem

gem install railties

答案 1 :(得分:0)

尝试运行bundle update

如果不起作用,请删除Gemfile.lock并运行

bundle install.

然后重启服务器