Thx Jonathan for the fix. Now its working for me
i’m a newbie, currently enjoying the tutorial. I’m on Installfest now, it has been smooth until now, i’m deploying my app to heroku and i’m starting to get errors per the below:
‘An error occurred while installing ruby -2.3.7
This version of Ruby is not available on Heroku-18. The minimum supported version of Ruby on the Heroku-18 stack can be found at:
what do I do?
It looks like you have an issue with the wrong ruby version being set. Take a look in the Gemfile and see if it explicitly sets a Ruby version anywhere.
ruby -v in your terminal and see if the output is 2.3.x or 2.5.x. If it’s 2.3 then rbenv hasn’t been set up correctly. You should swing by the gitter rooms for support.
i’ve checked from the terminal, the version is 2.3.7.
Guess I should head to the gitter rooms then?
Yeah, gitter rooms are a good place to get live feedback to debug an issue.
I’m having a problem at the “heroku run rails db:migrate” step.
I have an error that says “You must use Bundler 2 or greater with this lockfile”
Both gits are up-to-date. I have updated bundler but the error keeps coming up…
Traceback (most recent call last): 5: from /app/bin/rails:3:in `<main>' 4: from /app/bin/rails:3:in `load' 3: from /app/bin/spring:10:in `<top (required)>' 2: from /app/bin/spring:10:in `new' 1: from /app/vendor/ruby-2.6.0/lib/ruby/2.6.0/bundler/lockfile_parser.rb:95:in `initialize' /app/vendor/ruby-2.6.0/lib/ruby/2.6.0/bundler/lockfile_parser.rb:108:in `warn_for_outdated_bundler_version': You must use Bundler 2 or greater with this lockfile. (Bundler::LockfileError)```
heroku buildpacks:set https://github.com/bundler/heroku-buildpack-bundler2
Run the above command in your terminal inside the rails app directory. Then try running the command again.
Thank you for your answer. I’ve run this command before but I get this output :
› Error: The buildpack https://github.com/bundler/heroku-buildpack-bundler2
is already set on your app.
That’s why I’m kinda puzzled…
If I run
heroku buildpacks I get this :
$ heroku buildpacks
=== warm-coast-38117 Buildpack URL
And if I run
cat Gemfile.lock | grep -A 1 "BUNDLED WITH"
I get :
So it seems that I have the right version installed…
Maybe Rails is the problem ?
Should I check this file ?
How can I access it ? I can’t find it…
Sorry to be such a noob but I’d really like to solve this problem… Thanks again
So you managed to push the application ok, it’s just when you run the command to migrate to the database?
Try pushing the app up again. It might be the buildpack was set after the Gemfile.lock was built.
git push heroku master
Then try running the migrate command.
It doesn’t work… Git is up to date
$ git push heroku master
So I get the same error when I run the migrate command.
Should I delete/uninstall and reinstall/redo ?
git push --force heroku master
I tried but it didn’t work
I also tried to add a test file to push something new, the heroku push works fine but the same error comes up when I try to migrate.
Is my computer insane ?
No, have a google for that error you are getting and you’ll see it’s a common issue. The solutions there suggest manually setting the bundler version first. You can try that. See where you get with Google and let me know if you have any issues.
Will do. Thanks again