Hi, I''m trying to make a Rails'' Hello world app. I''ve installed rails 0.13.1, irb, ruby 1.8.2. These are the steps I''ve done: mkdir rails cd rails rails hello cd hello ruby script/generate controller Main ruby script/server If I go to http://127.0.0.1:3000/ I get the rails welcome home page. But If I go to http://127.0.0.1:3000/main/ or http://127.0.0.1:3000/Main/ I get: Routing Error No route for path: "Main" Failure reasons: 1. <ActionController::Routing::Route ":controller/service.wsdl" when {:action=>"wsdl"}> failed because no controller found at subpath main 2. <ActionController::Routing::Route ":controller/:action/:id" || {:id=>nil, :action=>"index"}> failed because no controller found at subpath main What I''ve done wrong? -- / Eduardo Yáñez Parareda /
Sorry, I don''t know why but it works fine now.
have you defined the index method for Main? If not, open the controller file and add this code def index render_text "Hello, World" end That should be all you need. On 9/2/05, Eduardo Yáñez Parareda <eduardo.yanez-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, I''m trying to make a Rails'' Hello world app. > I''ve installed rails 0.13.1, irb, ruby 1.8.2. > > These are the steps I''ve done: > > mkdir rails > cd rails > rails hello > cd hello > ruby script/generate controller Main > ruby script/server > > If I go to http://127.0.0.1:3000/ I get the rails welcome home page. > But If I go to > http://127.0.0.1:3000/main/ or http://127.0.0.1:3000/Main/ I get: > > Routing Error > > No route for path: "Main" > > Failure reasons: > > 1. <ActionController::Routing::Route ":controller/service.wsdl" > when {:action=>"wsdl"}> failed because no controller found at subpath > main > 2. <ActionController::Routing::Route ":controller/:action/:id" || > {:id=>nil, :action=>"index"}> failed because no controller found at > subpath main > > What I''ve done wrong? > > -- > / Eduardo Yáñez Parareda / > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Eduardo Yáñez Parareda wrote:> Sorry, I don''t know why but it works fine now.Did you restart WEBrick? Maybe it wasn''t the cause of your problems, but the first thing I learned about developing Rails was: if in doubt about a weird unexplainable problem, restart WEBrick and see if that fixes it. WEBrick is weird. ~Dave -- Dave Silvester Music Technology Junkie | Rentable Website Monkey http://www.mu-sly.co.uk | http://www.rentamonkey.com
Just like Windows eh? ;) Webrick tends to go crazy when there are some problems connecting to the database server, but for development its just awesome Maybe it wasn''t the cause of your problems, but the first thing I learned> about developing Rails was: if in doubt about a weird unexplainable > problem, > restart WEBrick and see if that fixes it. > > WEBrick is weird. > > ~Dave >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails