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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:24:32+00:00 2026-06-18T05:24:32+00:00

I am beginner in Rails & MVC development, and need help with the below:

  • 0

I am beginner in Rails & MVC development, and need help with the below:

I am doing the example in http://edgeguides.rubyonrails.org/getting_started.html

In “5.12 Updating Posts”, we are asked to add the following to our config/routes.rb:

patch "posts/:id" => "posts#update"

If I do that, and run rake routes, I am getting the below error:

undefined method `patch' for #<ActionDispatch::Routing::Mapper:0x390f078>

I get the same error when I go to – http://localhost:3000/posts/1

This is the line in edit.html.erb :

<%= form_for :post, url: { action: :update, id: @post.id }, method: :patch do |f| %>

I have Rails 3.2.1.

Environment:

I am doing this in Windows 7. I installed Rails via railsinstaller.org. Browsers – Chrome, Firefox

  • 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-18T05:24:33+00:00Added an answer on June 18, 2026 at 5:24 am

    patch is only available in Rails master branch.

    • Here is the related pull request: https://github.com/rails/rails/issues/348
    • Here is the blog article explaining the reasoning: http://weblog.rubyonrails.org/2012/2/25/edge-rails-patch-is-the-new-primary-http-method-for-updates/
    • Here is another great summary: http://blog.remarkablelabs.com/2012/12/http-patch-verb-rails-4-countdown-to-2013

    Among other things, you need to point to the git repo in your Gemfile to use edge rails on an already-existing project.

    gem 'rails', :git => 'git://github.com/rails/rails.git'
    

    For now you should just use PUT instead of PATCH. Even when 4.0 comes out, PUT isn’t going anywhere.

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

Sidebar

Related Questions

I am very much a beginner to rails and I have a specific need
I am a beginner at rails development and moved from cakephp. In cakephp there's
I am a beginner, I want to install & ruby on rails on local
Hi there Im a beginner to rails and what Im doing seems a common
I am beginner of Ruby on Rails and use Windows for development. I do
Good Morning, As a beginner to both Rails and web development, I don't know
This seems to be basic but I'm a Ruby/Rails beginner. I need to simply
Preface: I'm still a beginner to web development, let alone rails so I'm constantly
Rails beginner here.. I have a users resource where I implemented a callback that's
I'm a rails beginner and have been several hours now trying to figure out

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.