When I'm using git push heroku master, I'm facing the issue as shown in the below figure:
Please help me in resolving the issue.
With your log error, your ruby is not supported by Heroku. Check Heroku document then upgrade your Ruby version here
As mentioned in the heroku error logs, your ruby version is not upto date.
In your Gemfile, add this line to the top.
ruby '2.5.3'
run bundle install, commit and push again to heroku.
Its always good practice to specify your ruby version for all your project. This is good when you are moving your project from one environment or different server.
Add ruby '2.5.3' in your Gemfile as top most line and bundle
Related
I have a forked Github repo which is used by my app deployed on heroku. I included it in my Gemfile like this :
gem 'service-client', :git => 'https://github.com/blabla/client-stuff'
Now I changed some parts of the forked repo, which requires no changes in my heroku app.
So how can I make my heroku app, rebundle or do the bundle install or whatever to pick up the latest changes from https://github.com/blabla/client-stuff master branch?
You should update gem localy and write changes to Gemfile.lock by bundle update service-client then commit changes and push to origin. Heroku update you gemset when look in to the changes in Gemfile.lock.
Unfortunately it does require changes in your heroku app.
It requires the newest gem version. You will have to push up to heroku again so that it can re bundle your Gemfile.
there is not way to run a bundle update on heroku itself because this could cause git fast-forward issues along with other unexpected consequences where a newer gem does not work appropriately.
Heroku is a production environment and all changes should be tested locally before deploying
See this SO Question
I'm in trouble with deployment of my ruby-on-rails app on heroku.
Deploy failed with following logs.
Starting process with command bundle exec thin start -R config.ru -e staging -p 6882
bash: bundle: command not found
And I noticed when deploy, bundler(1.3.2) is removed and bundler(1.5.2) is used even if I specify bundler version as '1.3.2'.
When deploy, Using bundler(1.5.2) is shown but there is no bundler in heroku run 'gem list'.
This is happen after I pushed the commit that includes some gem's updates.
After that deploy, all deploys are failed even if I deloy the commit that worked well before.
Do you have a ruby definition in your gemfile like so?
source 'https://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.15'
.....
if you do, heroku will try to load bundler 1.5.2
try to update bundler like so
gem update bundler
then commit & push to heroku
I hope that helps
Thank you, everyone.
I fixed up this problem.
I tried all solutions in this post but couldn't get fixed, so I asked the heroku's support with detail information.
It is because I'm using the custom buildpack that not support Bundler 1.5.2.
So, I configure an app to use the Official Ruby Buildpack
heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby
Of course you all heard about the latest security hole in Rails which requires some updates. I'm currently using version 2.3.14 of Rails and therefore tried updating to 2.3.15 (the patched version).
On my local machine the process really went the rails way. But after pushing the changes to Heroku and waiting for deployment, my app didn't start. It says in the logs
RubyGem version error: rails(2.3.15 not = 2.3.14)
No how could that happen? My Gemfile says
gem 'rails', '~> 2.3.15'
and my Gemfile.lock says
GEM
specs:
rails (2.3.15)
and, finally, Heroku tells me
Installing rails (2.3.15)
Really, where is the problem? Other people having this problem?
Solution
The answer by Charles included the solution, which is to update the RAILS_GEM_VERSION to 2.3.15 in config/environment.rb.
Important Notice
If you have the same troubles, please use one of the proposed solutions immediatly. There are already known cases of corrupted Rails apps!
It seems like you also need to do change RAILS_GEM_VERSION to 3.2.15 in environment.rb:
If you find yourself having to do the whole upgrading process over again, you can follow these steps:
Run your tests and make sure everything works
Open up a new branch through git (git checkout -b new_rails)
Change Rails 3.2.15 in your Gemfile
Change RAILS_GEM_VERSION to '3.2.15' in environment.rb
Run bundle update rails
Run the tests and see if everything still works
If not, reverse back to the old branch by doing git checkout master; optionally delete the new branch by doing git branch -D new_rails
Taken from this question:
Site dead. "ACTION REQUIRED: Rails Security Vulnerability "
I know that my local machine and Heroku are using the same version of the gem, but I'm wondering if it's possible that Heroku hasn't grabbed the latest bug fix tracked here.
Is it possible that my local machine has a newer delayed_job 3.0.0 gem than Heroku does? The fix was committed on the 12th.
When does Heroku update its gems?
This seems likely because I can send email from my local rails app, but on Heroku, I run into problems detailed in the link above. I'm on the bamboo-mri-1.9.2 stack btw.
It short, it doesn't. If you're using Bundler you're stipulating which versions are used in your Gemfile (which in turn defines version numbers in your Gemfile.lock, both of which should be committed to Git).
If you're not using Bundler, and are still using the .gems file at the root of your project, Heroku will use the most recent it has, unless you define a different version in which case it will use that.
More info can be found here: http://devcenter.heroku.com/articles/gems
You should be able to specify a git repository in your Gemfile.
e.g.,
gem "delayed_job", :git => "git://github.com/collectiveidea/delayed_job.git", :ref => "80ca31f9eb"
using the commit with the fix.
(edit: wrong git repo, whoops.)
I was working through the first chapter of the Rails Tutorial. I pushed first_app to heroku. At first I was getting the sqlite3 error (I think). But, I edited the gemfile and pushed it up to heroku again. But, I don't get the same page as on: http://railstutorial.org/ruby-on-rails-tutorial-book#sec:1.4.3 (I think it's supposed to look like Figure 1.11 in section 1.4.3)
Instead, I get this: http://blooming-samurai-546.heroku.com/
It just says:
Heroku | Welcome to your new app!
Refer to the documentation if you need help deploying.
I did something wrong right? Any ideas what?
In your git console try:
git add .
git commit -am "Initial commit"
git push heroku
It looks like you pushed to heroku with nothing so it created an empty directory.
I had this same issue and was very frustrated by it. What solved the issue for me was moving
gem 'sqlite3'
into the block following
group :development, :test
in the Gemfile.
After that, no longer saw these kinds of messages:
remote: ! Failed to install gems via Bundler.
remote: ! Detected sqlite3 gem which is not supported on Heroku:
...
remote: ! Push rejected, failed to compile Ruby app.
in terminal after typing git push heroku or git push heroku master
Hope this helps.
Can’t argue with success.
However, before pushing the master with $ git push heroku master some folks may need to run the following command:
$ git remote add heroku git#heroku.com:your-heroku-url-goes-here.git
as discussed in the “Git Remotes and Heroku” section currently at:
http://devcenter.heroku.com/articles/git