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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T06:24:43+00:00 2026-05-31T06:24:43+00:00

I am getting a strange error on heroku. So I have an adress ressource

  • 0

I am getting a strange error on heroku. So I have an adress ressource that belongs to a user.
A user can have multiple adresses, e.g. shipping and billing.

of course I have

  resources :adresses

in my routes and all (scaffolded) REST controller actions.

now in my view I have the following statement:

<%= button_to "Edit", edit_adress_path(@adress), :class => "edit_adress funkybutton" %>

which generates the following html:

<form class="button_to" action="/adresses/7/edit?locale=en" method="post"><div><input type="submit" value="Edit" class="edit_adress funkybutton"><input type="hidden" value="d/s1KOUtYao+ieqJN3xAz2jrmGPcvF06LjKKHxnFc+o=" name="authenticity_token"></div></form>

Now whenever I click that button, I get the an error page on heroku saying

The page you were looking for doesn't exist.

You may have mistyped the address or the page may have moved.

When I type heroku logs I get:

2012-03-12T18:49:02+00:00 app[web.1]: Started POST "/adresses/7/edit?locale=en" for 85.177.82.243 at 2012-03-12 11:49:02 -0700
2012-03-12T18:49:02+00:00 app[web.1]: 
2012-03-12T18:49:02+00:00 app[web.1]: 
2012-03-12T18:49:02+00:00 app[web.1]: ActionController::RoutingError (No route matches "/adresses/7/edit"):

which seems very odd to me. Even stranger is that when I click in my browsers adress bar after and hit enter, it displays the edit form just fine. So it works, but every single time I click on the button I get this error message. I have no idea whatsoever could be causing the error and hope somebody can help. Thanks!

Btw. I am on Rails 3.0.5

  • 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-31T06:24:45+00:00Added an answer on May 31, 2026 at 6:24 am

    The button_to is creating a POST request to /addresses/7/edit which resources doesn’t define a route for. When you manually go to the link in your browser it’s creating a GET request, which routes to the edit action.

    You can change the button_to call to use a GET method:

    <%= button_to "Edit", edit_adress_path(@adress), :class => "edit_adress funkybutton", :method => :get %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting a strange error using jQuery 1.3.2 and Firefox. I have created
Trying to install pear package and keep getting this strange error. Can you shed
So I'm really new to Rails, and I'm getting a strange error that I
I am getting a strange error with valgrind on a program that makes use
I am getting a strange error in Firebug, that I am not getting in
I'm getting a strange error that only occurs on the live server. My Django
I'm getting a strange error. I have a function of the following signature: template
I'm getting a strange error and can't figure out why. I'd appreciate any input.
I'm getting that strange error on one of client's machines. It throws FileNotFoundException, but
I'm getting a strange error in VS 2010. I have a project set 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.