通过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
有什么想法吗?
答案 0 :(得分:0)
我完成了迈克尔哈特教程,我的宝石般看起来像这样:
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
尝试将unicorn gem添加到生产中。
答案 1 :(得分:0)
我有同样的问题。原来是因为我使用的是ruby 1.9.3,默认情况下heroku使用的是2.x.解决方案是通过添加以下行在Gemfile中明确指定ruby版本:
ruby“1.9.3”
提交和推送后,它完美运行。
有关指定ruby版本的详细信息,请参阅https://devcenter.heroku.com/articles/ruby-versions。