Hello, I''m just starting to learn Ruby on Rails. I''m following a tutorial in a book but the examples are not working, I keep getting Routing Error "no route found to match "/\\look\\at" with {:method=>:get}" What I have is a pretty simple example. I''ve put all the files in the correct directories -------------------------------------------------------------------- In ''..\app\controllers\look_controller'' I have: class LookController < ApplicationController def at @data = params[:text1] end end ------------------------------------------------------------------- In ''..\app\views\look\at.rhtml'' I have: <html> <head> <title></title> </head> <body> Your name is <%= @data %> <body> </html> ------------------------------------------------------------------- In ''..\public I have: <html> <head> <title></title> </head> <body> <form action = "\look\at"> <br> Please enter your name.<br> <input type="text" name="text1"> <br> <input type="submit"/> <body> </html> --------------------------------------------------------------------- When I start the server and navigate to http://localhost:3000/input.html I get the input.html page. When I use the submit button I get the Routing Error. I have no idea why. At this point learning Ruby on Rails isn''t much fun :-( Please help. Thank you. Brad --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Um.. You''re not supposed to put your form as a page in the public directory. That''s reserved for things more like pictures/javascript/stylesheets. You should make another view for your form which can then post to the other action. On Dec 7, 2007 9:29 AM, Brad <bradaskins-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hello, > > I''m just starting to learn Ruby on Rails. I''m following a tutorial in > a book but the examples are not working, I keep getting Routing Error > "no route found to match "/\\look\\at" with {:method=>:get}" > > What I have is a pretty simple example. I''ve put all the files in the > correct directories > > -------------------------------------------------------------------- > In ''..\app\controllers\look_controller'' I have: > class LookController < ApplicationController > def at > @data = params[:text1] > end > end > ------------------------------------------------------------------- > In ''..\app\views\look\at.rhtml'' I have: > <html> > <head> > <title></title> > </head> > <body> > Your name is <%= @data %> > <body> > </html> > ------------------------------------------------------------------- > In ''..\public I have: > <html> > <head> > <title></title> > </head> > <body> > <form action = "\look\at"> > <br> > Please enter your name.<br> > <input type="text" name="text1"> > <br> > <input type="submit"/> > <body> > </html> > --------------------------------------------------------------------- > > When I start the server and navigate to http://localhost:3000/input.html > I get the input.html page. When I use the submit button I get the > Routing Error. I have no idea why. At this point learning Ruby on > Rails isn''t much fun :-( > > Please help. > > Thank you. > > Brad > > > > > > >-- Ryan Bigg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 6 Dec 2007, at 22:59, Brad wrote:> <body> > <form action = "\look\at"> > <br>You shouldn''t be using backslashes, even if you''re on a machine which uses backslash as its path delimiter. When you''re dealing with URLs, / is the one true path delimiter. Fred> Please enter your name.<br> > <input type="text" name="text1"> > <br> > <input type="submit"/> > <body> > </html> > --------------------------------------------------------------------- > > When I start the server and navigate to http://localhost:3000/input.html > I get the input.html page. When I use the submit button I get the > Routing Error. I have no idea why. At this point learning Ruby on > Rails isn''t much fun :-( > > Please help. > > Thank you. > > Brad > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thank you for your help. It was the backslashes, now I feel silly for not trying that before I posted :-) Thanks again. Brad On Dec 6, 7:07 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6 Dec 2007, at 22:59, Brad wrote: > > > <body> > > <form action = "\look\at"> > > <br> > > You shouldn''t be using backslashes, even if you''re on a machine which > uses backslash as its path delimiter. When you''re dealing with URLs, / > is the one true path delimiter. > > Fred > > > Please enter your name.<br> > > <input type="text" name="text1"> > > <br> > > <input type="submit"/> > > <body> > > </html> > > --------------------------------------------------------------------- > > > When I start the server and navigate tohttp://localhost:3000/input.html > > I get the input.html page. When I use the submit button I get the > >RoutingError. I have no idea why. At this point learning Ruby on > > Rails isn''t much fun :-( > > > Please help. > > > Thank you. > > > Brad--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hello All, I am getting a routing error for every new project I start. I have searched tons for this issue but have come up with nothing that will remedy my problem. I am using RubyStack on a vista machine. Below in my routes.rb let me know what else I can give you for help. Thanks ActionController::Routing::Routes.draw do |map| # The priority is based upon order of creation: first created -> highest priority. # Sample of regular route: # map.connect ''products/:id'', :controller => ''catalog'', :action => ''view'' # Keep in mind you can assign values other than :controller and :action # Sample of named route: # map.purchase ''products/:id/purchase'', :controller => ''catalog'', :action => ''purchase'' # This route can be invoked with purchase_url(:id => product.id) # You can have the root of your site routed by hooking up '''' # -- just remember to delete public/index.html. # map.connect '''', :controller => "welcome" # Allow downloading Web Service WSDL as a file with an extension # instead of a file named ''wsdl'' map.connect '':controller/service.wsdl'', :action => ''wsdl'' # Install the default route as the lowest priority. map.connect '':controller/:action/:id.:format'' map.connect '':controller/:action/:id'' end -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Um, the actual routing error would be brilliant, also the version number of Rails that you''re running on right now. You haven''t uncommented the default route line: # map.connect '''', :controller => "welcome" You need to uncomment this line and change the controller to the controller you would like to serve your default requests. On Dec 18, 2007 4:11 PM, is ea <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hello All, > > I am getting a routing error for every new project I start. I have > searched tons for this issue but have come up with nothing that will > remedy my problem. I am using RubyStack on a vista machine. Below in my > routes.rb let me know what else I can give you for help. Thanks > > > > ActionController::Routing::Routes.draw do |map| > # The priority is based upon order of creation: first created -> > highest priority. > > # Sample of regular route: > # map.connect ''products/:id'', :controller => ''catalog'', :action => > ''view'' > # Keep in mind you can assign values other than :controller and > :action > > # Sample of named route: > # map.purchase ''products/:id/purchase'', :controller => ''catalog'', > :action => ''purchase'' > # This route can be invoked with purchase_url(:id => product.id) > > # You can have the root of your site routed by hooking up '''' > # -- just remember to delete public/index.html. > # map.connect '''', :controller => "welcome" > > # Allow downloading Web Service WSDL as a file with an extension > # instead of a file named ''wsdl'' > map.connect '':controller/service.wsdl'', :action => ''wsdl'' > > # Install the default route as the lowest priority. > map.connect '':controller/:action/:id.:format'' > map.connect '':controller/:action/:id'' > end > -- > Posted via http://www.ruby-forum.com/. > > > >-- Ryan Bigg http://www.frozenplague.net --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi all, I''m about to start work on a Rails application (I''m currently in the planning stages) and would like some advice. One of the requirements is to provide an add-in system that a non-technical user can work with. The concept is similar to the way that Wordpress allows a user to install plugins. Once the user has installed the plugin in the plugins directory, Wordpress automatically detects the plugin. The user doesn''t have to do anything else to be able to use the plugin other than activate it. What I''d like to do with my application is something similar by allowing the admin to import an add-in and then start using it without having to do any programming. S/he certainly shouldn''t have to go in and modify the application. I was thinking of using the following structure/process for this. * The application would have an add-ins directory (separate from the Rails plugins) which would be the add-in repository. This could be at a different location from the Rails application. * The application would detect the add-in in this directory and provide the details to the admin who could then install it. If there is a database change involved, perhaps migrations could be used. * The add-in would then be accessible from the appropriate places in the application. It would install pages in the admin section for instance to allow the administrator to change settings. * The addins can be designed as a single function for simple functionality, or as using the Rails MVC functionality for a more complex add-in. My questions are: 1. Is this feasible? 2. Would I be fighting Rails to do this? 3. Are there any resources around that describe how something like this can be done? 4. Is there anything else I should know about doing this? Cheers John "Warning: The information contained in this email and any attached files is confidential to BAE Systems Australia. If you are not the intended recipient, any use, disclosure or copying of this email or any attachments is expressly prohibited. If you have received this email in error, please notify us immediately. VIRUS: Every care has been taken to ensure this email and its attachments are virus free, however, any loss or damage incurred in using this email is not the sender''s responsibility. It is your responsibility to ensure virus checks are completed before installing any data sent in this email to your computer." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 18 Dec 2007, at 06:19, JUDD, John wrote:> Hi all, > > I''m about to start work on a Rails application (I''m currently in the > planning stages) and would like some advice. > > One of the requirements is to provide an add-in system that a non- > technical user can work with. The concept is similar to the way that > Wordpress allows a user to install plugins. Once the user has > installed the plugin in the plugins directory, Wordpress > automatically detects the plugin. The user doesn’t have to do > anything else to be able to use the plugin other than activate it. > > What I’d like to do with my application is something similar by > allowing the admin to import an add-in and then start using it > without having to do any programming. S/he certainly shouldn’t have > to go in and modify the application. > > I was thinking of using the following structure/process for this. > > · The application would have an add-ins directory (separate > from the Rails plugins) which would be the add-in repository. This > could be at a different location from the Rails application. > > · The application would detect the add-in in this directory > and provide the details to the admin who could then install it. If > there is a database change involved, perhaps migrations could be used. > > · The add-in would then be accessible from the appropriate > places in the application. It would install pages in the admin > section for instance to allow the administrator to change settings. > > · The addins can be designed as a single function for simple > functionality, or as using the Rails MVC functionality for a more > complex add-in. > > My questions are: >You might want to look at the engines plugin. IIRC it does allow you to pluginize migrations, controllers etc... Fred> 1. Is this feasible? > > 2. Would I be fighting Rails to do this? > > 3. Are there any resources around that describe how something like > this can be done? > > 4. Is there anything else I should know about doing this? > > > Cheers > > John > > > > "Warning: > The information contained in this email and any attached files is > confidential to BAE Systems Australia. If you are not the intended > recipient, any use, disclosure or copying of this email or any > attachments is expressly prohibited. If you have received this email > in error, please notify us immediately. VIRUS: Every care has been > taken to ensure this email and its attachments are virus free, > however, any loss or damage incurred in using this email is not the > sender''s responsibility. It is your responsibility to ensure virus > checks are completed before installing any data sent in this email to > your computer." > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Thanks Fred, I''ll check that out. -----Original Message----- From: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org [mailto:rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org] On Behalf Of Frederick Cheung Sent: Wednesday, 19 December 2007 8:52 PM To: rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Subject: [Rails] Re: User Extensibility in a Rails App On 18 Dec 2007, at 06:19, JUDD, John wrote:> Hi all, > > I''m about to start work on a Rails application (I''m currently in the > planning stages) and would like some advice. > > One of the requirements is to provide an add-in system that a non- > technical user can work with. The concept is similar to the way that > Wordpress allows a user to install plugins. Once the user has > installed the plugin in the plugins directory, Wordpress > automatically detects the plugin. The user doesn''t have to do > anything else to be able to use the plugin other than activate it. > > What I''d like to do with my application is something similar by > allowing the admin to import an add-in and then start using it > without having to do any programming. S/he certainly shouldn''t have > to go in and modify the application. > > I was thinking of using the following structure/process for this. > > * The application would have an add-ins directory (separate > from the Rails plugins) which would be the add-in repository. This > could be at a different location from the Rails application. > > * The application would detect the add-in in this directory > and provide the details to the admin who could then install it. If > there is a database change involved, perhaps migrations could be used. > > * The add-in would then be accessible from the appropriate > places in the application. It would install pages in the admin > section for instance to allow the administrator to change settings. > > * The addins can be designed as a single function for simple > functionality, or as using the Rails MVC functionality for a more > complex add-in. > > My questions are: >You might want to look at the engines plugin. IIRC it does allow you to pluginize migrations, controllers etc... Fred> 1. Is this feasible? > > 2. Would I be fighting Rails to do this? > > 3. Are there any resources around that describe how something like > this can be done? > > 4. Is there anything else I should know about doing this? > > > Cheers > > John >"Warning: The information contained in this email and any attached files is confidential to BAE Systems Australia. If you are not the intended recipient, any use, disclosure or copying of this email or any attachments is expressly prohibited. If you have received this email in error, please notify us immediately. VIRUS: Every care has been taken to ensure this email and its attachments are virus free, however, any loss or damage incurred in using this email is not the sender''s responsibility. It is your responsibility to ensure virus checks are completed before installing any data sent in this email to your computer." --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---