Rails 3 route problem

Original from here: Rails 3 route problem

Hello,

After solving the other problem with routes , now I have another one.

I have this route in my routes.rb:

match "user/create_new_password/:reset_password_key"
=>"users#create_new_password", :via=>[:post, :get], :as=>:create_new_password
I can test it in my functional tests like this:

test "should create new password " do
    post :create_new_password,
{:user=>{:password=>"123456", :password_confirmation=>"123456"}, :reset_password_key=>user.reset_password_key}
end
In my view, I have the following form:

=simple_form_for @user, :url=>create_new_password_path do |f|

=f.input :password, :label=>I18n.t("activerecord.attributes.user.email")

=f.input :password_confirmation, :label=>I18n.t("activerecord.attributes.user.password_confirmation")
    =f.submit I18n.t "activerecord.actions.user.create_new_password"

When I submit the form, I get:

No route matches "/user/create_new_password/
OqQxYTgjYKxXgvbAsTsWtMnIpMOpsjCRzLGZmJZLSbYtjvcvdpO"
The big string, is the reset_password_key.

I have tested it in functional tests with the same value for
reset_password_key.

The relevant output for rake routes is:

create_new_password POST|GET /user/
create_new_password/:reset_password_key(.:format)
{:controller=>"users", :action=>"create_new_password"}
I'm missing something...

since the routes match exactly, I think the problem is in the method. I haven’t used simple_form yet so I don’t know what it does

but you should check if it sets the method to PUT for existing records.

Yeah, I was only allowing POST and GET on that route, Rails was
looking for a PUT because the object user was not new.

Thanks

I think that I am experiencing the same issue. My background on Rails is
fairly limited, but since upgrading to Rails 3.0.4, I've had issues
testing my controller on live server. Webrick works fine, but when I
test my application on my server, it gives me the 404 HTML Error.
I'm using a test-live environment on a GoDaddy Virtual Dedicated Server
with Plesk Control Panel.
I'll log into the server via ssh. I am able to create the rails
application via
rails new depot -d mysql
This will create the application in the ~ directory which contains the
httpdocs folder (where the domain points to).
I can create a symbolic link to the application folder
cd httpdocs
ln -s ~/depot/public depot
I can then navigate to www.mydomain.com/depot and see the Rails default
public page.
However, whenever I create a new scaffold
rails generate scaffold Product \ title:string description:text
image_url:string price:decimal
and
rake db:migrate
everything executes successfully. My issue is that I cannot view this on
the website. I think that it could have something to do with the
routes.rb, but have no clue on how this is suppose to tie in together.
Any help would be appreciated!