missing required flag heroku tail

13,736

Solution 1

I solved, needed to define the PG version in my gemfile:

gem 'pg', '~> 0.18.4'

Solution 2

First of all, to get the log error to work correctly also pass a flag for your app name as well:

heroku logs --tail --app my_heroku_app_name

Also, it seems you have nested gem groups. I am assuming you are using postgresql as your database for production so I would recommend to move pg out of development>production group like so:

gem 'pg'
group :development do
  gem 'sqlite3'
  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'
end

Then run

bundle install

Lastly, try pushing to heroku again with

git push heroku master
Share:
13,736

Related videos on Youtube

westman2222
Author by

westman2222

Updated on June 27, 2022

Comments

  • westman2222
    westman2222 4 months

    I am working to deploy my rails app. Everything in running in local environment but I am having some issues making my first push to heroku. I am getting the standard app error, see pic:

    enter image description here

    when i run the command heroku logs --tail, i get the following error:

    enter image description here

    my gemfile is as so:

    source 'https://rubygems.org'
    # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
    gem 'rails', '4.2.6'
    # Use sqlite3 as the database for Active Record
    # Use SCSS for stylesheets
    gem 'sass-rails', '~> 5.0'
    # Use Uglifier as compressor for JavaScript assets
    gem 'uglifier', '>= 1.3.0'
    # Use CoffeeScript for .coffee assets and views
    gem 'coffee-rails', '~> 4.1.0'
    # See https://github.com/rails/execjs#readme for more supported runtimes
    # gem 'therubyracer', platforms: :ruby
    # Use jquery as the JavaScript library
    gem 'jquery-rails'
    # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
    gem 'turbolinks'
    # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
    gem 'jbuilder', '~> 2.0'
    # bundle exec rake doc:rails generates the API under doc/api.
    gem 'sdoc', '~> 0.4.0', group: :doc
    # Use ActiveModel has_secure_password
    # gem 'bcrypt', '~> 3.1.7'
    # Use Unicorn as the app server
    # gem 'unicorn'
    # Use Capistrano for deployment
    # gem 'capistrano-rails', group: :development
    group :development, :test do
      # Call 'byebug' anywhere in the code to stop execution and get a debugger console
      gem 'byebug'
    end
    group :development do
      gem 'sqlite3'
      # Access an IRB console on exception pages or by using <%= console %> in views
      gem 'web-console', '~> 2.0'
      group :production do
         gem 'pg'
    end
      # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
      gem 'spring'
    end
    

    below are my heroku logs:

    2

    018-02-09T00:48:11.108425+00:00 app[web.1]:     from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    2018-02-09T00:48:11.108427+00:00 app[web.1]:    from /app/vendor/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:68:in `require'
    2018-02-09T00:48:11.108435+00:00 app[web.1]:    from bin/rails:3:in `load'
    2018-02-09T00:48:11.108437+00:00 app[web.1]:    from bin/rails:3:in `<main>'
    2018-02-09T00:48:11.120606+00:00 app[web.1]: => Booting WEBrick
    2018-02-09T00:48:11.120615+00:00 app[web.1]: => Rails 4.2.6 application starting in production on http://0.0.0.0:52651
    2018-02-09T00:48:11.120619+00:00 app[web.1]: => Ctrl-C to shutdown server
    2018-02-09T00:48:11.120618+00:00 app[web.1]: => Run `rails server -h` for more startup options
    2018-02-09T00:48:11.120621+00:00 app[web.1]: Exiting
    2018-02-09T00:49:30.407211+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=postcable.herokuapp.com request_id=ec520950-df52-44ee-95aa-890d9ad76949 fwd="67.20.250.6" dyno= connect= service= status=503 bytes= protocol=https
    2018-02-09T00:49:32.372812+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=postcable.herokuapp.com request_id=ffdb944b-9293-4d96-8986-b0af2974704c fwd="67.20.250.6" dyno= connect= service= status=503 bytes= protocol=https
    
  • westman2222
    westman2222 over 4 years
    when i run the --tail --app I am now getting the following Cannot set property 'login' of undefined