Heroku Installfest


#65

Thx Jonathan for the fix. Now its working for me :slight_smile:


#67

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:
https://devcenter.heroku.com/articles/ruby-support#supported-runtimes

what do I do?


#68

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.

Otherwise run 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.


#69

i’ve checked from the terminal, the version is 2.3.7.

Guess I should head to the gitter rooms then?


#70

Yeah, gitter rooms are a good place to get live feedback to debug an issue.


#71

Hi,

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)```

#72

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.


#73

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
https://github.com/bundler/heroku-buildpack-bundler2

And if I run cat Gemfile.lock | grep -A 1 "BUNDLED WITH"
I get :
BUNDLED WITH
2.0.1

So it seems that I have the right version installed…

Maybe Rails is the problem ?

Should I check this file ?
/app/vendor/ruby-2.6.0/lib/ruby/2.6.0/bundler/lockfile_parser.rb
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


#74

So you managed to push the application ok, it’s just when you run the command to migrate to the database?


#75

Correct !


#76

Try pushing the app up again. It might be the buildpack was set after the Gemfile.lock was built.

Try git push heroku master

Then try running the migrate command.


#77

It doesn’t work… Git is up to date

$ git push heroku master
Everything up-to-date

So I get the same error when I run the migrate command.

Should I delete/uninstall and reinstall/redo ?


#78

Try git push --force heroku master


#79

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 ?


#80

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.


#81

Will do. Thanks again


#82

Done the rails project in web development 101, which worked fine in localhost, but when deployed on heroku didn’t work properly. Nothing happened when I tried to login on the heroku app, and there are no tags and articles.

https://arcane-bayou-50051.herokuapp.com/

Any help would be appreciated.


#83

There will not be any tags or articles, until you create them, since the Heroku app will be a production version with a different db (Postgress, not SQLite) and the db will be empty to begin with (unless you seeded it, which I am pretty sure you didn’t in that exercise).

Try creating some articles and tags, and see if it all works.

Note: I cannot see any way to sign up as a new user on your application, which probably means you created users manually, via the rails console. If so, then your Heroku app will probably also not have any users yet, hence you cannot even log in. If you have a ‘sign up’ page (just no link to it from the home page) and can navigate to it by entering the correct url suffix in the Heroku app, then use that to create the new users. If not, you will first need to run heroku console from the application directory root, and manually create a user or two, just as you did locally using rails console.


#84

where to look exactly? I am a total newbie


#85

We are now on discord