[英]Rails App Failing to Push to Heroku Could not find rake-10.4.2
working through Hart's rails tutorial, and can't get past this error: 通过Hart的rails教程工作,无法克服此错误:
remote: Your Gemfile has no gem server sources. If you need gems that are not already on
remote: your machine, add a line like this to your Gemfile:
remote: source 'https://rubygems.org'
remote: Could not find rake-10.4.2 in any of the sources
remote: Bundler Output: Your Gemfile has no gem server sources. If you need gems that are not already on
remote: your machine, add a line like this to your Gemfile:
remote: source 'https://rubygems.org'
remote: Could not find rake-10.4.2 in any of the sources
but I definitely have Rake installed, and source ' https://rubygems.org ' in my Gemfile 但是我肯定已经安装了Rake,并且在我的Gemfile中提供了“ https://rubygems.org ”
Here is my Gemfile: 这是我的Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.0.rc3'
gem 'sass-rails', '5.0.0.beta1'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.0.0.beta2'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
end
Any ideas? 有任何想法吗?
I completed the michael hartl tutorial and my gemlike looks like this: 我完成了michael hartl教程,我的gemlike看起来像这样:
source 'https://rubygems.org'
gem 'rails', '4.2.0.beta4'
gem 'bcrypt', '3.1.7'
gem 'faker', '1.4.2'
gem 'carrierwave', '0.10.0'
gem 'mini_magick', '3.8.0'
gem 'fog', '1.23.0'
gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'bootstrap-sass', '3.2.0.0'
gem 'sass-rails', '5.0.0.beta1'
gem 'uglifier', '2.5.3'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '4.0.0.beta2'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'rails-html-sanitizer', '1.0.1'
gem 'sdoc', '0.4.0', group: :doc
group :development, :test do
gem 'sqlite3', '1.3.9'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
end
group :test do
gem 'minitest-reporters', '1.0.5'
gem 'mini_backtrace', '0.1.3'
gem 'guard-minitest', '2.3.1'
end
group :production do
gem 'pg', '0.17.1'
gem 'rails_12factor', '0.0.2'
gem 'unicorn', '4.8.3'
end
Try adding the unicorn gem into production. 尝试将麒麟宝石添加到生产中。
I had this same problem. 我有同样的问题。 It turned out to be because I was using ruby 1.9.3, and by default heroku is using 2.x. 原来是因为我使用的是ruby 1.9.3,默认情况下,heroku使用的是2.x。 The resolution is to specify your ruby version explicitly in your Gemfile, by adding the following line: 解决方案是通过添加以下行来在Gemfile中显式指定您的ruby版本:
ruby "1.9.3" 红宝石“ 1.9.3”
After committing and pushing, it worked perfectly. 提交并推送后,它运行完美。
See https://devcenter.heroku.com/articles/ruby-versions for details on specifying your ruby version. 有关指定您的Ruby版本的详细信息,请参见https://devcenter.heroku.com/articles/ruby-versions 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.