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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T23:33:10+00:00 2026-05-10T23:33:10+00:00

I am new to Ruby on Rails, I have completed the Blog Tutorial .

  • 0

I am new to Ruby on Rails, I have completed the Blog Tutorial.

I am now trying to add an additional action to the controller, called ‘start’.

def start end 

I have added a view page ‘app/views/posts/start.html.erb’ containing nothing but simple html.

When I go to /posts/start i get the following error.

ActiveRecord::RecordNotFound in PostsController#show  Couldn't find Post with ID=start 

I understand the error, the show action is being executed and start is not a valid ID. Why doesn’t the start action get executed, is there some part of the MVC architecture or configuration I am missing ?

Below is my posts_controller.rb

class PostsController < ApplicationController    # GET /posts/start   def start   end    # GET /posts   # GET /posts.xml   def index     @posts = Post.find(:all)     respond_to do |format|       format.html # index.html.erb       format.xml  { render :xml => @posts }     end   end    # GET /posts/1   # GET /posts/1.xml   def show     @post = Post.find(params[:id])     respond_to do |format|       format.html # show.html.erb       format.xml  { render :xml => @post }     end   end  end 

Yes I have restarted the server and tried it with Mongrel and webrick.

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

    Your routing isn’t set up to allow that route. Assuming you’re using the default scaffolding, put this line before the map.resources :posts line in config/routes.rb:

    map.connect 'posts/:action', :controller => 'posts', :action => /[a-z]+/i 

    The regex for :action restricts it to just a-z (to avoid catching things like /posts/1). It can be improved if you need underscores or numbers in your new actions.

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

Sidebar

Related Questions

I have built a very simple blog application using Ruby on Rails. New to
I am new to Ruby and Rails so bear with me please. I have
I'm new on both this site and ruby on rails! I have a common
I'm new to Ruby on Rails and I'm trying to model my table relationships.
I'm new to Ruby on Rails, and I'm trying to create a bass guitar
I am new to Ruby on Rails and I'm desperately trying to get a
First I'm quite new to ruby and rails... I have a little application working
I have a problem, trying to render partials in ruby on rails with the
I am new to Ruby, using ruby 1.9.2P180 and Rails 3.1.0.rc2 I have screen.css
I'm new to rails and working my way into the tutorial here: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book I've

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.