# Link\_to wrong path

**URL:** <https://www.ruby-forum.com/t/link-to-wrong-path/111118>\
**Category:** Rails\
**Created:** [August 2, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/link-to-wrong-path/111118 "2007-08-02T20:50:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sketchy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/258eb7/32.png) [@Sketchy](https://www.ruby-forum.com/u/Sketchy)\
**Post date:** [August 2, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/link-to-wrong-path/111118/1 "2007-08-02T20:50:08Z")

</div>

HI guys, I’m starting with RoR and I figured I’d jump on the facebook  
bandwagon and make a little application… my problem is when using  
link\_to inside my application I get wrong paths… Let’s say my  
application url is [Facebook](http://apps.facebook.com/app/) and my application is  
hosted at [http://someserver.com/main/](http://someserver.com/main/) (main being my controller). The  
problem is that when I use scaffold my links have the wrong path. For  
example, \<%= link\_to ‘Edit’, :action =\> ‘edit’, :id =\> torrent %\> give  
me a link to [http://apps.facebook.com/main/edit/1](http://apps.facebook.com/main/edit/1) and not to  
[http://apps.facebook.com/app/main/edit/1](http://apps.facebook.com/app/main/edit/1). how can I change this?
