Lottie
Lottie

Reputation: 29

How to push my Rails app to Heroku

I have made changes to the database I need to migrate.

After commiting my changes to github with no problem, when I attempt to push my app to Heroku using

push heroku master

I receive several error messages on the command line.

Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote:        Warning: the running version of Bundler (1.13.7) is older than the version that created the lockfile (1.14.6). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.

As the error bedug instructs, I ran

gem install bundler

and then it gave me a second error:

WARNING:
remote: No Procfile detected, using the default web server.
remote: We recommend explicitly declaring how to boot your server process via a Procfile
devcenter.heroku.com/articles/ruby-default-web-server

I followed the instructions on the website in the link attached, but didn't resolve the problem.

Can anyone tell me if I'm missing something in the bigger picture?

Background/more info: I migrated my database to Heroku in the past with no problem, added a method to products and then got so many errors.

enter image description here

Upvotes: 0

Views: 231

Answers (2)

DawgOnKing
DawgOnKing

Reputation: 31

Heroku restricts the version of Bundler that your app can use in production. Even if your version is newer - it will generate the above message.

See https://devcenter.heroku.com/articles/bundler-version

As for Procfile message - that's generated because your attempting to install a server gem (most likely Puma) that requires the file to run on Heroku instead of Webrick. Webrick is generally considered unsuitable for production use because it can't accept a large volume of incoming requests at once.

Follow instructions at https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server if you're attempting to run Puma.

Upvotes: 2

jvillian
jvillian

Reputation: 20263

On your bundler error, you should be able to safely ignore it (since you're getting a warning and not a true error). See the Heroku article.

On your procfile error, visit the article referenced or read about Process Types and the Procfile. Again, you can safely ignore this warning and Heroku will boot up using the default web server (Webrick, I believe).

Upvotes: 0

Related Questions