I'm trying to push my rails project to heroku bit when doing a git push heroku master bundler fails with the following message:
Bundler Output: Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Fetching git://github.com/justinfrench/formtastic.git
Fetching git://github.com/activerecord-hackery/ransack.git
Fetching git://github.com/gregbell/active_admin.git
Could not find jwt-0.1.12 in any of the sources
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:murmuring-mountain-9361.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:murmuring-mountain-9361.git'
It seems jwt is a dependency of one of my gems, but it installs fine on my local environment. I tried explicitly declaring gem 'jwt', '0.1.12' in my gemfile, which worked fine locally, but not on heroku and I tried deleting the Gemfile.lock and generating it again. I even tried deleting the app instance off heroku and creating it again.
The following gist is my gemfile: https://gist.github.com/anonymous/84d3fc00566e036729cd
I'm using this vagrant box for my dev environment: https://github.com/ejholmes/vagrant-heroku
If you updated your gems in the last few days then you would have gotten a faulty version that was yanked. It was re-released as 1.0.0 because it has a slightly different API. I'd recommend using 0.1.11 or switching to 1.0 ... thanks, and sorry!
You'll get this when versions of Gems you are using (via your Gemfile.lock) have been yanked from RubyGems.org and Heroku is trying to grab them when you deploy.
You can see that 0.1.12 of jwt has been yanked at http://rubygems.org/gems/jwt/versions. The thing to do would be to look at your Gemfile.lock to see which gem is declaring the dependency on 0.1.12 and then fork that gem and bump the version and then use your forked version. Or contact the Gem owner and gem them to bump the dependency.
Related
I'm having a lot of trouble deploying my code to Heroku.
I started by going to the Heroku logs. And, the photo is what was there.
enter image description here
So, I ran bundle install and got the error
An error occurred while installing pg (1.2.3), and Bundler cannot
continue.
Make sure that `gem install pg -v '1.2.3' --source 'https://rubygems.org/'`
succeeds before bundling.
Eventually, I got that corrected. Just decided to work for some reason. Then, however, I started getting another error when trying to deploy. The error was:
remote: ! Failed to install gems via Bundler.
4:32
remote: ! Push rejected to brownsapp.
remote:
To https://git.heroku.com/brownsapp.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/brownsapp.git'
I then tried git push --force heroku. No dice. Then it came to thinking that it was trying to deploy from the wrong branch. But the main branch is the only branch I have. I checked and made sure. Noticed that the terminal also said
Warning - The same version of this code has already been built:
So, I ran git commit --allow-empty -m "Redeploying" trying to get the app deployed.
No dice. Then I noticed another error saying:
Your bundle only supports platforms ["x86_64-darwin-18"] but your local platform
remote: is x86_64-linux.`
So, I ran the command bundle lock --add-platform x86_64-linux
And then the error continued to show. I tried deleting the Gemfile.lock file. That didn't help either. I'm at a compete loss. Any help would be appreciated.
I fixed my problem by adding the linux platform to my bundler Gemfile.lock with this commande.
bundle lock --add-platform x86_64-linux
Perhaps you can add it manually. Look for platform in your Gemfile.lock,
see the picture here for help https://i.stack.imgur.com/PLpya.png
I'm following the Hartl rails tutorial, figured I'd give ruby a go. Previously was able to deploy to heroku just fine. Started a new project, and right after I changed my gem file and used the "bundle update" command, I got this error message:
An error occurred while installing ruby_dep (1.2.0), and Bundler cannot continue.
I tried pushing to my heroku master branch and got this message:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy....
remote:
! [remote rejected] master -> master (pre-receive hook declined)
I updated my bundler, my version of ruby is up to date...no clue what's going on here. Any help?
You must either have ruby >= 2.2.5 or add the following gem to your gemfile
gem 'listen', '3.1.1' and then run
bundle install
Since I have ruby 2.2.4, I added the above gem to my gemfile , then ran bundle install
Everything works fine after this step. Enjoy.
I'm reading this manual and when I try to deploy my first app git says:
-----> Heroku receiving push
-----> Ruby/Rails app detected
-----> Detected Rails is not set to serve static_assets
Installing rails3_serve_static_assets... done
-----> Configure Rails 3 to disable x-sendfile
Installing rails3_disable_x_sendfile... done
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Windows Gemfile.lock detected, ignoring it.
You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
You have added to the Gemfile:
* source: rubygems repository http://rubygems.org/
* rails (= 3.0.3)
* sqlite3 (= 1.3.3)
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
To git#heroku.com:myapp.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:myapp.git'
Any solution?
Unfortunately, you can't deploy to Heroku very well from a Windows Rails installation.
It is telling you that you didn't commit the file right after saying it ignored the file, so the real question you're trying to answer is "why isn't Heroku accepting my Windows Gemfile.lock file?". Based on that, I'd have pulled out "Windows Gemfile.lock detected; ignoring it" and pasted that into google or here in Stack Overflow.
That would have lead you to this previous SO answer: Why won't Heroku accept my Gemfile.lock in Windows?
I am working with a rails app and I can't seem to be able to push my app to Heroku. I have set up everything and use git but everytime I push it to heroku I get this:
Unresolved dependencies detected; Installing...
Using --without development:test
You have modified your Gemfile in development but did not check
the resulting snapshot (Gemfile.lock) into version control
You have added to the Gemfile:
* therubyracer (>= 0.8.2)
* libnotify
* rb-inotify
You have deleted from the Gemfile:
* growl
* rb-fsevent
FAILED: http://devcenter.heroku.com/articles/bundler
! Heroku push rejected, failed to install gems via Bundler
I have noticed that my version of gem is 1.0.11 but the heroku push is using running Bundler version 1.0.7. I dont know if this makes a difference but I don't know how to go back to an older version.
Thanks for any help.
It looks like you failed to add your Gemfile.lock into the git repo for heroku.
Make sure it's not in your .gitignore, then:
git add Gemfile.lock
git commit -m "Adding Gemfile.lock"
If you have therubyracer in your Gemfile are you using Rails 3.1? You would be much better off running on the Cedar stack as opposed to the Bamboo stack. Cedar does not require the rubyracer gem to be in your gemfile. Bundler version doesn't matter in this case, 1.0.11 is used on Cedar whilst 1.0.7 is used on Bamboo but that's all managed by Heroku.
For the life of me I can not figure out how to fix this issue. I have looked around for the whole day and found simular issues but they all seem to be slightly different.
-----> Heroku receiving push
-----> Rails app detected
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Your Gemfile doesn't have any sources. You can add one with a line like 'source:rubygems'
Could not find rake-0.8.7 in any of the sources
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 git#heroku.com:smooth-wind-620.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:
Bundle install and bundle list both have rake listed.
Have you tried adding something like source 'http://rubygems.org' to the top of your Gemfile, or source :gemcutter? That's the first error I see heroku giving you and would be the first thing I would try to resolve.