skip to Main Content

I have a Rails app and I try to push it to Heroku. After I pushed it to Heroku, I get Application Error message.

When I run heroku logs -n 300, I get this (sorry for pasting the logs in Gist. StackOverflow not allowing me to post >30K characters question).

This is my Gemfile:

source ''

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.1'

# 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'

# Use jquery as the JavaScript library
gem 'jquery-rails'

# Twitter Bootstrap
gem 'bootstrap-sass', ''

# Build JSON APIs with ease. Read more:
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc

# Devise for user auth
gem 'devise'

# CanCanCan for user roles
gem 'cancancan', '~> 1.10'

# Gravatar
gem 'gravatar_image_tag'

# Font Awesome
gem 'font-awesome-sass'

group :development, :test do
  # Use sqlite3 as the database for Active Record
  gem 'sqlite3'

  # Call 'byebug' anywhere in the code to stop execution and get a debugger console
  gem 'byebug'

  # Access an IRB console on exception pages or by using <%= console %> in views
  gem 'web-console', '~> 2.0'

  # Spring speeds up development by keeping your application running in the background. Read more:
  gem 'spring'

group :production do
  gem 'pg',             '0.17.1'
  gem 'rails_12factor', '0.0.2'

ruby "2.2.2"

I thought that the error is because I’m not running rake db:migrate on Heroku. But, after I run heroku run rake db:migrate, the error is still same.

What should I do?

Note: This app runs well on my localhost.



  1. Chosen as BEST ANSWER


    I moved all my Users controllers inside /controllers/ folder.




    ...and delete the Users folder.

  2. You’re getting a uninitialized constant Users (NameError) error in the app/controllers/Users/confirmations_controller.rb file, line 1. Probably you’re trying to use an User class, in the singular, and just mistyped it.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top