Browse the Ruby on Rails Community.

You are here: Forums Ask a Rails expert undefined method `rewrite' for...

Replytotopic

undefined method `rewrite' for #<url:0xb75f2848>

Posted in Forums : Ask a Rails expert

 
Profile

Authority 37
Posting Rating 65
Sign in to rate this post

My controller is Url. when i execute its showing the error

undefined method `rewrite’ for #<url:0xb75f2848>

Its showing error in layout at line no. 27

27: <= link_to ‘Logout’, :controller => ‘login’, :action => ‘logout’ %>
28:
29: <
= url_for(:controller=> :upload,:action =>‘picture’,
30: :id => session[:user_id]) %> width=”100” height=”100”/>

 
Profile

Authority 62
Posting Rating 97
Sign in to rate this post

Hi

Try putting <%= after 27th and 29th line, as below

27: <= link_to ‘Logout’, :controller => ‘login’, :action => ‘logout’ %>

<=
28:
29: <= url_for(:controller=> :upload,:action =>‘picture’,
<
=

Hope this helps

Thanks

Replytotopic

Other Recent Topics

Ask a Rails expert : Is this a good way to add Admin section

Ask a Rails expert : RSS feed maker in rails 2.1

Ask a Rails expert : Syncing with ugly legacy databases

Ask a Rails expert : juggernaut Error

Ask a Rails expert : gem "chronic" error

Ask a Rails expert : gem install error

Ask a Rails expert : need your help or views for distributed programming with ruby

Ask a Rails expert : how to refresh ruby files without restart production server

Ask a Rails expert : Ruby on Rails eCommerce

Ask a Rails expert : Ar-extensions import - on_duplicate_key_update error

Formatting Help
  • *bold*       _italics_      
    bq. (quotes)
  • "DSC":http://www.dsc.net
  • * or # (lists)
or cancel