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 6005509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:24:26+00:00 2026-05-23T01:24:26+00:00

Ruby 1.8.7, Rails 2.3.11 Main question: what could cause Rails to send me the

  • 0

Ruby 1.8.7, Rails 2.3.11

Main question: what could cause Rails to send me the index page for an object type after trying to create a new object of that type? No errors produced, no success message, no new entries in the database

I used ruby script/generate scaffold poster owner_id:integer event_id:integer to create a standard scaffold, then ran rake db:migrate. Without changing any files, I tried to create a new poster object, and it sent me to /posters rather than /posters/show/1, as it’s supposed to do.

Other information which may be of help:

There are other object types already in place on the server. This problem originally cropped up when I was trying to have the poster belong_to :owner and belong_to :event.

If the information was getting to the model to be validated, it would return an error blank required entries. If I enter the data manually into the MySQL database, it shows up in the index page, and can be edited (and saved) without issue. Because of that, I think that the issue is either in the controller file or the database itself, but nothing raised a red flag when I looked through.

I have minimal (4 weeks of a class) experience with Rails, and have been stuck on this for three days now.

routes.rb: (commented lines stripped)

ActionController::Routing::Routes.draw do |map|
  map.resources :posters
  map.resources :place_informations
  map.resources :building_polygon_coordinates
  map.resources :alternate_names
  map.resources :events
  map.resources :hours_listings
  map.resources :locations

  map.connect 'json/buildings', :controller => 'json', :action => 'buildings'
  map.resources :users
  map.resources :buildings

  map.root :controller => "home"

  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
end

Applicable part of development.log: (the very end; just the attempt to create a new poster; SQL calls stripped out)

Processing PostersController#index (for <my IP address> at 2011-05-26 20:32:44) [GET]
~~ SQL stuff, call timings ~~~
Rendering template within layouts/posters
Rendering posters/index
~~ SQL stuff, call timings ~~~


Processing PostersController#new (for <my IP address> at 2011-05-26 20:32:48) [GET]
~~ SQL stuff, call timings ~~~
Rendering template within layouts/posters
Rendering posters/new
~~ SQL stuff, call timings ~~~



Processing PostersController#index (for <my IP address> at 2011-05-26 20:32:56) [GET]
~~ SQL stuff, call timings ~~~
Rendering template within layouts/posters
Rendering posters/index
~~ SQL stuff, call timings ~~~

It is “get index, get new, get index”
It should be* “get index, get new, post create, get show, get index”

  • 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-23T01:24:26+00:00Added an answer on May 23, 2026 at 1:24 am

    I got it fixed.

    The DirectorySlash toggle in Apache had to be set to “Off”. I’m not sure why that affected it in the way that it did, but the issue was resolved after adding the line DirectorySlash Off to “.htaccess”.

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

Sidebar

Related Questions

I'm new to ruby/rails and trying to build a simple Projects / Tags app
I'm new in Ruby/Rails, so, my question: what is the perfect way to upload
I am using Ruby on Rails and am trying to load a page which
What is the best way to generate a random DateTime in Ruby/Rails? Trying to
This is more a general question but my particular case involves a ruby/rails app
Ruby on Rails has become a new competitive face in the server programming industry,
new to Ruby so I'm still getting to grips with some of the Rails
I am new to Ruby on Rails. I am using Netbeans IDE. While importing
I am new to Ruby on Rails. I am excited about Feed parsing but
I am trying to design my ruby on rails app at the moment. I

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.