return ID after create (rails 2.1)

I'm using a Flex app to post to a controller called segments using the url http://localhost:3000/segments and am able to successfully create the record in AR. However the block of code that should return the ID of the new record being created in XML which is this

    respond_to do |format|       if         format.xml { render :xml => @segment, :status => :created, :location => @segment }       else         format.xml { render :xml => @segment.errors, :status => :unprocessable_entity }       end     end   end

Seems to be returning the following instead

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"> <HTML>   <HEAD><TITLE>Not Found</TITLE></HEAD>   <BODY>     <H1>Not Found</H1>     `/segments/' not found.     <HR>     <ADDRESS>      WEBrick/1.3.1 (Ruby/1.8.6/2007-09-24) at      localhost:3000     </ADDRESS>   </BODY> </HTML>