Hello, I''m installed RubyOnRails in my Fedora Core 4 system. I''ve created an empty web application with: rails cookbook then a controller ruby script/generate controller MyTest And a file named my_test_controller.rb was created at cookbook/app/controller directory. I ''ve written a new method for MyTestController class like: def index render_text "Hello World" end Finally I''ve started the server: ruby script/server Well If I go to http://127.0.0.1:3000 I can see the initial page from ruby server. That''s okay. If I go to http://127.0.0.1:3000/MyTest or http://127.0.0.1:3000/MyTest/index I get the 404 error. The log file says: Processing MyTestController#index (for 127.0.0.1 at Thu Jun 23 18:14:45 CEST 2005) Parameters: {"action"=>"index", "controller"=>"my_test"} Completed in 0.00114 (880 reqs/sec) So I suppose all is right, but browser doesn''t show me the index page. -- / Eduardo Yáñez Parareda /
On Thu, 2005-06-23 at 18:28 +0200, Eduardo Yáñez Parareda wrote:> Hello, I''m installed RubyOnRails in my Fedora Core 4 system. > > I''ve created an empty web application with: > > rails cookbook > > then a controller > > ruby script/generate controller MyTest > > And a file named my_test_controller.rb was created at > cookbook/app/controller directory. > I ''ve written a new method for MyTestController class like: > > def index > render_text "Hello World" > end > > > Finally I''ve started the server: > > ruby script/server > > Well If I go to http://127.0.0.1:3000 I can see the initial page from > ruby server. That''s okay. > If I go to http://127.0.0.1:3000/MyTest or > http://127.0.0.1:3000/MyTest/index I get the 404 > error. > > The log file says: > > Processing MyTestController#index (for 127.0.0.1 at Thu Jun 23 > 18:14:45 CEST 2005) > Parameters: {"action"=>"index", "controller"=>"my_test"} > Completed in 0.00114 (880 reqs/sec) > > So I suppose all is right, but browser doesn''t show me the index page. >How about trying: http://127.0.0.1:3000/my_test/ -Robby -- /****************************************************** * Robby Russell, Owner.Developer.Geek * PLANET ARGON, Open Source Solutions & Web Hosting * Portland, Oregon | p: 503.351.4730 | f: 815.642.4068 * www.planetargon.com | www.robbyonrails.com *******************************************************/
> How about trying: > > http://127.0.0.1:3000/my_test/Same result 404 Error. And the log file: Processing MyTestController#index (for 127.0.0.1 at Thu Jun 23 18:44:40 CEST 2005) Parameters: {"action"=>"index", "controller"=>"my_test"} Completed in 0.00128 (780 reqs/sec) -- / Eduardo Yáñez Parareda /
Eduardo Yáñez Parareda wrote:> Same result 404 Error. And the log file:Did you try... http://127.0.0.1:3000/mytest/ ... no underscore, all lower case? ~Dave -- Dave Silvester Rent-A-Monkey Website Development Web: http://www.rentamonkey.com/
> ... no underscore, all lower case?Well I''ve tested this URLs 1. mytest 2. my_test 3. MyTest 4. My_Test ...and got this log 1. (mytest) Processing Base#index (for 127.0.0.1 at Fri Jun 24 09:19:05 CEST 2005) Parameters: {} ActionController::RoutingError (No route for path: "mytest"): /usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/routing.rb:291:in `recognize!'' /usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/dispatcher.rb:32:in `dispatch'' /home/eyp/Desarrollo/ruby/cookbook/public/dispatch.rb:10 /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:189:in `load'' /usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:189:in `load'' /usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:82:in `handle_dispatch'' /usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:35:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:21:in `dispatch'' script/server:48 Rendering /usr/lib/ruby/gems/1.8/gems/actionpack-1.8.1/lib/action_controller/templates/rescues/layout.rhtml (404 Page Not Found) 2. my_test Processing MyTestController#index (for 127.0.0.1 at Fri Jun 24 09:19:08 CEST 2005) Parameters: {"action"=>"index", "controller"=>"my_test"} Completed in 0.00115 (868 reqs/sec) 3. MyTest Processing MyTestController#index (for 127.0.0.1 at Fri Jun 24 09:19:13 CEST 2005) Parameters: {"action"=>"index", "controller"=>"my_test"} Completed in 0.00116 (860 reqs/sec) 4. My_Test Processing MyTestController#index (for 127.0.0.1 at Fri Jun 24 09:19:16 CEST 2005) Parameters: {"action"=>"index", "controller"=>"my_test"} Completed in 0.00117 (852 reqs/sec)
With any URL I''ve tested I get this output for console? What means ''#<NameError: uninitialized constant Breakpoint>''? #<NameError: uninitialized constant Breakpoint> ["/usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:183:in `const_missing''", "/usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/dispatcher.rb:54:in `reset_application''", "/usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/dispatcher.rb:36:in `dispatch''", "/home/eyp/Desarrollo/ruby/cookbook/public/dispatch.rb:10", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:189:in `load''", "/usr/lib/ruby/gems/1.8/gems/activesupport-1.0.4/lib/active_support/dependencies.rb:189:in `load''", "/usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:82:in `handle_dispatch''", "/usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:35:in `service''", "/usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service''", "/usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''", "/usr/lib/ruby/1.8/webrick/server.rb:155:in `start_thread''", "/usr/lib/ruby/1.8/webrick/server.rb:144:in `start''", "/usr/lib/ruby/1.8/webrick/server.rb:144:in `start_thread''", "/usr/lib/ruby/1.8/webrick/server.rb:94:in `start''", "/usr/lib/ruby/1.8/webrick/server.rb:89:in `each''", "/usr/lib/ruby/1.8/webrick/server.rb:89:in `start''", "/usr/lib/ruby/1.8/webrick/server.rb:79:in `start''", "/usr/lib/ruby/1.8/webrick/server.rb:79:in `start''", "/usr/lib/ruby/gems/1.8/gems/rails-0.12.1/lib/webrick_server.rb:21:in `dispatch''", "script/server:48"] [2005-06-24 09:40:02] ERROR `/My_Test/'' not found. <-- Well, this line depends on the URL I was tried. May be I''ve not installed something right? How could I unistall rails and try to install it again?
Well, I''ve solved the problem. I''ve read another post telling how to solve the ''uninitialized constant Breakpoint'' error. I hadn''t installed irb package, I thought it wasn''t needed for web apps. Now all works fine, thanks to people that has worried about my problem.