rails newbie here. I'm working through the tutorial on railstutorial.org on a Ubuntu 14.04 virtual machine. It's been pretty smooth sailing up until I got to heroku. When I want to push my app to heroku, it complains that it could not find rake-10.3.2. I checked heroku, and the application seems to be empty. However, I have rake-10.3.2 in my application, and if use "bundle show rake", it shows the correct version.
brandon@brandon-virtualbox:~/rails_projects/first_app$ bundle show rake
/home/brandon/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/rake-10.3.2
That looks okay, but when I try to push it to heroku, I get:
brandon@brandon-virtualbox:~/rails_projects/first_app$ git push heroku master
Initializing repository, done.
Counting objects: 66, done.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 14.46 KiB | 0 bytes/s, done.
Total 66 (delta 6), reused 0 (delta 0)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using 1.6.3
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Could not find rake-10.3.2 in any of the sources
Bundler Output: Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Could not find rake-10.3.2 in any of the sources
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git@heroku.com:dry-springs-4465.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:dry-springs-4465.git'
I noticed that it's using version 2.0.0 (which I have installed), but it's attempting to install the dependencies using 1.6.3. I'm not sure if that is related to the issue or not. My Gemfile is here:
source 'https://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.8'
group :development do
gem 'sqlite3', '1.3.8'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end
I've been messing with it for a while, and have had no luck. I'm using RVM as well, but I'm a total newbie so I'm not sure what kind of impact that would have. If anyone would know what's going on, I'd appreciate it!
Thanks!
In my case, this was caused because I had some gems, but not all of them, under version control in
vendor/cache
. It seems that whenvendor/cache
is present, Heroku will not go to any of the other sources.I solved this problem by moving the gem that I needed cached to another location, and then removing the
vendor/cache
folder from version control.