[英]Rails App Failing to Push to Heroku Could not find rake-10.4.2
通過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
但是我肯定已經安裝了Rake,並且在我的Gemfile中提供了“ https://rubygems.org ”
這是我的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
有任何想法嗎?
我完成了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
嘗試將麒麟寶石添加到生產中。
我有同樣的問題。 原來是因為我使用的是ruby 1.9.3,默認情況下,heroku使用的是2.x。 解決方案是通過添加以下行來在Gemfile中顯式指定您的ruby版本:
紅寶石“ 1.9.3”
提交並推送后,它運行完美。
有關指定您的Ruby版本的詳細信息,請參見https://devcenter.heroku.com/articles/ruby-versions 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.