Hello,
Just getting going on Rails… I have been working through Michael
Hartl’s tutorial and things were going good till I suddenly got the
error below when deploying to Heroku.
Before this I had deployed number of times successfully. Locally via
localhost things work fine… I can see there is a dependency
mismatch but I can’t figure out how to solve it or what caused it.
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Installing dependencies using Bundler version 1.1.rc.7
Running: bundle install --without development:test --path
vendor/bundle --binstubs bin/
Fetching gem metadata from https://rubygems.org/…
Bundler could not find compatible versions for gem “railties”:
In Gemfile:
rails (= 3.2.1) ruby depends on
railties (= 3.2.1) ruby
sass-rails (= 3.2.3) ruby depends on
railties (3.2.2.rc1)
!
! Failed to install gems via Bundler.
I did a fresh install of rails and started another project from
scratch. But this time I got this error on very first heroku push.
I will appreciate if someone can tell me what I have messed up and how
to fix this.
Thanks… sanjay
I also have cygwin installed (not sure that is relevant but there have
been issues with mingw32 apps). After installing all of the above I did
the following:
- Ran "gems update"
- Followed Rails Tutorial exactly
The tutorial process failed at the step for pushing to Heroku with error
shown in the original question. I tried to work around the problem:
* Tried changing Gemfile back to "~> " versions
* Deleted extra local versions of installed railsties and
sass-rails, reinstalled only the specified versions
* Tried using sass-rails 3.2.4 in Gemfile in hopes the dependency
would correct itself
Nothing worked. Sometimes a local “bundle update”/“bundle install” would
work, sometimes it would fail. It seemed to always work from a git bash
window and cmd.exe failed most of the time. But no matter what the
outcome locally, when I tried to push to Heroku it always gave the
error message above.
Rubygems.org clearly shows that the sass-rails dependency on railties
should be on 3.2.0.beta so something funky is going on. Just wish I knew
what it is.
I thought I’d tried that combination before but it had failed. This time
it worked. Either something new in ‘gems update’ changed things or I
neglected to do the commit for this particular combination.
Either way, thanks for getting me up and running again.