Skip to content

Instantly share code, notes, and snippets.

@mwilc0x
Created January 15, 2011 17:09
Show Gist options
  • Save mwilc0x/781054 to your computer and use it in GitHub Desktop.
Save mwilc0x/781054 to your computer and use it in GitHub Desktop.
Error on localhost:3000/wiki
Routing Error
No route matches "/wiki" with {:method=>:get}
#####config/routes.rb######
ActionController::Routing::Routes.draw do |map|
map.connect '', :controller => "wiki"
map.connect ':controller/service.wsdl', :action => 'wsdl'
map.connect ':controller/:action/:id'
end
#####app/views/layouts/wiki.rhtml#####
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Wiki: <%= controller.action_name %></title>
<%= stylesheet_link_tag "wiki" %>
</head>
<body>
<div id="wikipagebody">
<% if @flash[:notice] %>
<div id="flash"><%= flash[:notice] %></div>
<% end %>
<%= yield %>
<br /><br /><br /><br /><br /><br />
</div>
<div id="menu">
<h1>Menu</h1>
<% if @page and @page.title %>
<%= link_to "Edit this page", { :action => "edit",
:id => @page.id } %>
<br />
<%= link_to "Page History", { :action => "history",
:id => @page.id } %>
<br />
<% end %>
<p><a href="/wiki">HomePage</a></p>
<p><%= link_to "List of Wiki Pages", :action => 'list' %></p>
<p><%= link_to "Add a New Page", :action => 'new' %></p>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment