Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8154211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:15:57+00:00 2026-06-06T16:15:57+00:00

I see numerous posts regarding issues with deploying to Heroku, but I haven’t been

  • 0

I see numerous posts regarding issues with deploying to Heroku, but I haven’t been able to find the solution for my case. Any input would be much appreciated.

I have a blogging application that runs fine locally. However, I am returning “I’m sorry, but something went wrong” when I deploy to Heroku.

The gems I have are:

group :development do
  gem 'sqlite3', '1.3.5'
end

group :production do
  gem 'pg', '0.12.2'
end

The steps I’ve taken are:

git add.
git commit -am "latest update"
git push
git push heroku
rake db:migrate
heroku run rake db:migrate

My SQLite3 database is migrating fine, as I can find my latest blog entry (Blog.find(21)) through rails console.
However, the data does not seem to be migrating to the Heroku database, as the Heroku console returns

"ActiveRecord::RecordNotFound: Couldn't find Blog with id=21."

Additionally, “heroku logs” finds:

Completed 500 Internal Server Error in 50ms
NoMethod Error (undefined method 'blogs' for nil:NilClass):
  app/controllers/static_pages_controller.rb:8:in 'home'

Does this mean there could be an issue in my static_pages_controller, or is it just returning an error because the database is not migrating correctly?

Below is my static_pages controller, which works fine on my local server.

class StaticPagesController < ApplicationController
  def home
    if signed_in?
      @blog = current_editor.blogs.build
    end

    @editor = Editor.first
    @blogs = @editor.blogs.paginate(page: params[:page])
  end
end

Note: I am using Editor.first above because I (ie. editor_id: 1) will be the only editor of my blog. I just created an Editor model to store the password_digest.

So, why isn’t my application deploying on Heroku?

Any feedback would be appreciated. Also, please let me know if you need to see additional files, and I will attach.

Thanks so much!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T16:15:58+00:00Added an answer on June 6, 2026 at 4:15 pm

    Running db:migrate only runs the database migrations, it won’t copy any data from your development environment to Heroku. You should be using heroku db:push to push data from your local environment to Heroku:

    Import: Push to Heroku

    Use heroku db:push when you wish to transfer an existing database to Heroku. For example, you might want to import an SQLite database that you’ve been working with in local development or a MySQL database you have deployed on another host.

    That sounds like what you want to do so try running heroku db:push.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've read through numerous posts here regarding mysql2, but although the gem seems to
I know this question has been asked numerous times but I've tried everything. I
this question had been asked here numerous times, however I couldn't find help in
See Deepa answer for the solution :) I read all of the solution given
See solution below, I would like some constructive feedback. what is the running time
See the solution at the bottom of the question. IE 8 (and lower) does
I have encountered numerous times when a silverlight program is running perfectly, but after
I have found numerous partial answers to this question, but nothing that seems like
Note, I have found the solution to my problem. Please see below. I'm converting
I have reviewed numerous reports of this error but the solutions I have seen

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.