gpt4 book ai didi

ruby-on-rails - Rails 3.2.3 - Bundler 找不到 gem "railties"的兼容版本

转载 作者:行者123 更新时间:2023-12-03 00:37:34 25 4
gpt4 key购买 nike

我一直在关注 Michael Hartl 的 "Ruby on Rails Tutorial" 的更新版本我在“git push heroku master”步骤中遇到了错误。 git bash产生的错误如下:

 $git push heroku master
Counting objects: 70, done

...

Fetching gem metadata from https://rubygems.org/.........

Bundler could not find compatible version 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.4.rc1)

此外,这是我使用的 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


# 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.2'

# 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-debug19', :require => 'ruby-debug'

我能找到的唯一调试说明涉及与教程中使用的版本不同的 Ruby 版本(即不是 3.2.3 的版本),因此我们将不胜感激。提前致谢!

最佳答案

查看输出:

jquery-rails (= 2.0.0) ruby depends on
railties (3.2.4.rc1)

您使用的 jquery-rails gem 依赖于与您不同的 Rails 版本。您应该更改 jquery-rails 依赖项或升级 Rails。

更新

看来您可能在bundler 中发现了一个错误。因此,要使其正常工作,您必须将 Rails 版本更改为:

gem 'rails', '3.2.4.rc1'

关于ruby-on-rails - Rails 3.2.3 - Bundler 找不到 gem "railties"的兼容版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10792522/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com