I am struggling to push my code to Heroku. And after searching on Google and Stack Overflow questions, I have not been able to find the solution. Here is What I get when I try "git push heroku master" :
Heroku receiving push -----> Rails app detected -----> Detected Rails is not set to serve static_assets Installing rails3_serve_static_assets... done -----> Gemfile detected, running Bundler version 1.0.3 Unresolved dependencies detected; Installing... Fetching source index for http://rubygems.org/ /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:300:in `open_uri_or_path': bad response Not Found 404 (http://rubygems.org/quick/Marshal.4.8/mail-2.2.6.001.gemspec.rz) (Gem::RemoteFetcher::FetchError) from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/remote_fetcher.rb:172:in `fetch_path' . ....
And finally:
FAILED: http://docs.heroku.com/bundler ! Heroku push rejected, failed to install gems via Bundler error: hooks/pre-receive exited with error code 1 To [email protected]:myapp.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to '[email protected]:myapp.git'
Thanks for your help!
If there’s a specific gem that won’t install on Heroku, please submit a support ticket. To use, install bundler: Create a file named Gemfile in the root of your app specifying what gems are required to run it: This file should be added to the git repository since it is part of the app.
Heroku Push - Error with Git Push to Heroku 0 Git push heroku error 55 Gem file with git remote failing on heroku push 1 heroku push rejected, failed to compile Ruby app
I'm pretty sure Heroku only supports certain versions of Rails, so you need to be on at least 3.0, instead of a release candidate. Update the version of Rails in your gemfile, run bundle update, and then try to push to Heroku. Share
Bundler is the default gem dependency manager for Ruby projects. Bundler is the way to manage your gems on Heroku. Almost any gem - even those with native dependencies - can be installed using Bundler. If there’s a specific gem that won’t install on Heroku, please submit a support ticket.
I don't think it's a Rails version problem, nor is it specific to Heroku. (I hit the same problem today, when running bundle install
on my local development machine, with Rails 3.0.3.)
Running bundle update
locally, as Andrew suggested, fixes the issue.
Edit: As suggested in the comments: remember to git add .
, git commit -m "message"
I have same issue: remote: ! Failed to install gems via Bundler.
if you see the problem is this:
remote: Your bundle only supports platforms ["x86_64-darwin-16"] but your local platform remote: is x86_64-linux. Add the current platform to the lockfile with `bundle loc remote: --add-platform x86_64-linux` and try again.
its mean this :
Your bundle only supports platforms ["x86_64-darwin-16"] but your local platform is x86_64-linux. Add the current platform to the lockfile with `bundle loc --add-platform x86_64-linux` and try again.
If you see in your gemfile.loc you only have this :
PLATFORMS x86_64-darwin-16
So I did this command, To add in your platform in gemfile.loc
bundle lock --add-platform x86_64-linux
This will update your Gemfile.loc :
PLATFORMS x86_64-darwin-16 x86_64-linux
Continue :
git add . git commit -m "add platform x86_64-linux"
Push again
git push heroku master:main
Solve!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With