Rails 3.2.3 - Bundler找不到兼容版本的宝石“railties” [英] Rails 3.2.3 - Bundler could not find compatible versions for gem "railties"
问题描述
我一直关注Michael Hartl的 Ruby on Rails的更新版本教程,我在git push heroku master步骤遇到错误。 GIT bash产生的错误如下所示:
$ git push heroku master
计数对象:70,done
...
从https://rubygems.org / .........
获取gem元数据Bundler可以没有找到兼容版本的宝石railties:
在Gemfile中:
rails(= 3.2.3)ruby依赖于
railties(= 3.2.3)ruby
jquery-rails (= 2.0.0)ruby取决于
railties(3.2.4.rc1)
另外,这里是我使用的Gemfile:
source'https://rubygems.org'
gem'rails','3.2.3'
#Bundle edge Rails改为:
#gem'rails',::git => 'git://github.com/rails/rails.git'
group:development do
gem'sqlite3','1.3.5'
end
#默认情况下,Gems仅用于资产,并且在生产环境中不需要
#。
group:assets do
gem'sass-rails','3.2.4'
gem'coffee-rails','3.2.2'
#参见https://github.com/sstephenson/execjs#readme获得更多支持的运行时
#gem'therubyracer',:platform => :ruby
gem'uglifier','1.2.3'
结束
gem'jquery-rails','2.0.0'
#使用ActiveModel has_secure_password
#gem'bcrypt-ruby','〜> 3.0.0'
#为JSON使用Jbuilder模板
#gem'jbuilder'
使用独角兽作为应用服务器
#gem' unicorn'
#使用Capistrano进行部署
#gem'capistrano'
#使用调试器
#gem'ruby-debug19',:require = > 'ruby-debug'
我能找到的唯一调试指令处理的Ruby版本与本教程中使用的版本(即不是3.2.3的版本),所以任何帮助将不胜感激。
查看输出:
<$ p $ ($ 2.0)ruby依赖于
railties(3.2.4.rc1)
您使用的 jquery-rails 宝石依赖于不同的rails版本。您应该更改 jquery-rails 依赖项或升级Rails。 更新 看起来您可能在 bundler 中发现了一个错误。所以,为了使它工作,你必须改变你的Rails版本: I've been following along with the updated version of Michael Hartl's "Ruby on Rails Tutorial" and I encountered an error at the "git push heroku master" step. The error produced by the GIT bash is as follows: Also, here is the Gemfile I used: The only debugging instructions I could find dealt with versions of Ruby that were different than the version used in the tutorial (that is, versions that weren't 3.2.3), so any help would be greatly appreciated. Thanks in advance! Look at the output: The jquery-rails gem you're using relies on a different rails version than you do. You should either change the jquery-rails dependency or upgrade Rails. UPDATE Looks like you might have found a bug in bundler. So, to get it working, you will have to change your Rails version to:
这篇关于Rails 3.2.3 - Bundler找不到兼容版本的宝石“railties”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! jquery-rails
gem'rails','3.2.4 .rc1'
$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)
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'
jquery-rails (= 2.0.0) ruby depends on
railties (3.2.4.rc1)
gem 'rails', '3.2.4.rc1'