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

  • Home
  • SEARCH
  • 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 5995045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:54:17+00:00 2026-05-22T23:54:17+00:00

I have a threaded Post using Ancestry. When replying to a Post from another

  • 0

I have a threaded Post using Ancestry.
When replying to a Post from another user I get :

on the line :

@post = current_user.posts.new(params[:post])

Started POST “/posts.js” for 127.0.0.1
at Tue Jun 07 13:50:19 +0300 2011
Processing by PostsController#create
as JS Parameters: {“commit”=>”Post”,
“post”=>{“body”=>”

a

“,
“parent_id”=>”5”,
“discussion_id”=>”1”},
“authenticity_token”=>”RUra0Ndv67cgaGshBS5yCJMq5V6WG6OuZiqDbbWP5cc=”,
“utf8″=>”✓”} User Load (0.2ms)
SELECT “users”.* FROM “users” WHERE
(“users”.”id” = 33) LIMIT 1 Post
Load (0.2ms) SELECT “posts”.* FROM
“posts” WHERE (“posts”.user_id = 33)
AND (“posts”.”id” = 5) LIMIT 1
Completed in 238ms

ActiveRecord::RecordNotFound (Couldn’t
find Post with ID=5 [WHERE
(“posts”.user_id = 33)]):
app/controllers/posts_controller.rb:28:in
`create’

How can I debug it ?

  • 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-05-22T23:54:17+00:00Added an answer on May 22, 2026 at 11:54 pm

    My first pass would be to open rails console (at the prompt type ‘rails console’) and then try the following:

    >> x = Post.find(5)
    

    If you find it check the user_id on that record. Does it actually exist? If so, that’s good to know.

    Next I would take the SQL in your output above and run it manually in whatever db you use. If you’re using SQLite3 you can do:

    >> sqlite3 db/development.sqlite3
    

    If it exists then it’s a fair point to scratch your head. I suspect you will find that it’s not there.

    Is the link to reply to the post manually created in your view? Are you certain it’s being built correctly–the two ids of interest are indeed what you intended them to be?

    If it’s correctly built then I would simply use the ruby debugger in your controller and begin stepping through code. If you’re not familiar with the ruby debugger, you can get the gem as described in your Gemfile and then once it’s in your gemset you can add this line of code where you want to breakpoint your code:

    require 'ruby-debug'; debugger
    

    Then you’re free to explore as necessary.

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

Sidebar

Related Questions

I have python threaded application + Postgres. I am using Django's ORM to save
Good afternoon everybody! I have this threaded SerialPort wrapper that reads in a line
Image that I have a huge database which stores threads and posts from different
I have an application that performs HTTP posts at regular intervals (data retrieved from
I have threaded code where each thread needs to write to the same file.
I have a multi-threaded C++ app which does 3D rendering with the OpenSceneGraph library.
I have an single threaded, embedded application that allocates and deallocates lots and lots
I have a multi-threaded Windows application that occasionally deadlocks. Inevitably this happens on a
I have a multi-threaded Windows C++ app written in Visual Studio 6. Within the
I have a multi threaded .NET app that uses async I/O and AsyncCallbacks to

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.