# Undifined method! driving me insane!

**URL:** <https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383>\
**Category:** Rails\
**Created:** [September 22, 2010, 12:52pm UTC](https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383 "2010-09-22T12:52:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arowan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e8c25b/32.png) [@arowan](https://www.ruby-forum.com/u/arowan)\
**Post date:** [September 22, 2010, 12:52pm UTC](https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383/1 "2010-09-22T12:52:19Z")

</div>

Hi all,

im new to ruby on rails, this is my first project and im stuck on a  
rather (i expect) simple problem. ☹

ive made a link

\<%= link\_to “Profile”, show\_profile\_path %\>

in my main application.html.erb

i have a profiles\_controller.rb with the method “show” in it

“def show  
@profile = Profile.find(current\_user.id)  
end”

and i have “resources :profiles” in my routers.rb

i also have a show.html.erb file with in

# my profile

but i keep getting the error

“undefined method ‘show\_profile\_path’ for …”

it dosnt make any sence to me as ive got another link to  
new\_profile\_path that works?!

please help, much thanks Al

---

<div class="post-metadata">

**Author:** ![arowan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e8c25b/32.png) [@arowan](https://www.ruby-forum.com/u/arowan)\
**Post date:** [September 22, 2010, 12:58pm UTC](https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383/2 "2010-09-22T12:58:47Z")

</div>

On 22 September 2010 11:52, Al Rowan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> but i keep getting the error
> 
> “undefined method ‘show\_profile\_path’ for …”

\<%= link\_to “Profile”, @profile %\>

---

<div class="post-metadata">

**Author:** ![arowan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e8c25b/32.png) [@arowan](https://www.ruby-forum.com/u/arowan)\
**Post date:** [September 22, 2010, 1:32pm UTC](https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383/3 "2010-09-22T13:32:10Z")

</div>

next time type rake routes and look at the names of the helpers there  
you  
will see the helper for the show action is

profile\_path no show\_profile\_path, the output of rake route does not add  
the  
path ad the end because it could be something else

like url, e.g. profile\_url

---

<div class="post-metadata">

**Author:** ![arowan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e8c25b/32.png) [@arowan](https://www.ruby-forum.com/u/arowan)\
**Post date:** [September 22, 2010, 2:42pm UTC](https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383/4 "2010-09-22T14:42:16Z")

</div>

radhames brito wrote:

> next time type rake routes and look at the names of the helpers there  
> you  
> will see the helper for the show action is
> 
> profile\_path no show\_profile\_path, the output of rake route does not add  
> the  
> path ad the end because it could be something else
> 
> like url, e.g. profile\_url

oh ace that “rake routes” thing helped a treat! thanks alot 😃
