After updating my app to the latest version of RoR (built 22 July from SVN)
I got strange error with routing.
I have removed public/index.html and tried to configure routing to
handle default
server path. So I added following line to routes.rb
map.connect '''', :controller => "blog"
Then I started Webric server and point browser to http://localhost:3000
but I got blank page and following stacktrace in development.log
==START==Processing Base#index (for 127.0.0.1 at Sun Jul 24 22:27:06 GTB
Standard Time 2005)
Parameters: {}
MissingSourceFile (No such file to load -- ./../config/../config/routes.rb):
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:193:in
`load''
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:193:in
`load''
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/routing.rb:540:in
`reload''
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:49:in
`prepare_application''
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:31:in
`dispatch''
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in
`handle_dispatch''
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in
`service''
c:/progra~1/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in
`service''
c:/progra~1/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:155:in
`start_thread''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:144:in
`start_thread''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''
c:/progra~1/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start''
c:/progra~1/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in
`dispatch''
server:49
===END==
I started Webrick by ''ruby server'' in script folder so file
''./../config/../config/routes.rb'' is present. And this error
was
strange for me.
Is it bug??
I tried to perform the same steps with fresh application but the same.
ENV = {
:os => :WinXP
:ruby_version => ''1.8.2-15''
:ror_version => :SVN
}
--
anatol
> server:49Are you running webrick from the script directory? You should be running ruby script/server>From your rails app directory.-- Cheers Koz
Thanks Michael it works but I have 2 questions. 1) Why should I run from APP dir?? Generator script works fine from script dir. `ruby generate controller my_controller` 2) Why rails doesn''t show exception page?? If any error occurs rails should show pretty exception page. Right?? On 7/24/05, Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Are you running webrick from the script directory? You should be running > ruby script/server > From your rails app directory.-- anatol
On 7/25/05, Anatol Pomozov <anatol.pomozov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Thanks Michael it works but I have 2 questions. > 1) Why should I run from APP dir?? Generator script works fine from script dir. > `ruby generate controller my_controller`You should call all of them from the app dir, that''s where they''re designed to work from. generate works because ... it just does? ;)> 2) Why rails doesn''t show exception page?? If any error occurs rails > should show pretty exception page. Right??The error you had was pretty early on in the request handling process, probably before the pretty exception handlers were setup. This is a pretty lame excuse and probably something we should fix. -- Cheers Koz
Hernán Nicolás Taboada
2005-Jul-26 17:02 UTC
Re: No such file to load ''config/routes.rb''
Hello people, I''m new to the RoR world, I''m just trying to follow the Rails Academy''s tutes, (the "15 minutes setup vídeo"), just after generating the Blog controller, when I try the "Hello World!" example on Firefox, the following error appears: --- MissingSourceFile in <controller not set>#<action not set> No such file to load -- /config/routes.rb server:49 Show framework trace <http://localhost:3000/Blog/#> c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:193:in `load'' c:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.1.1/lib/active_support/dependencies.rb:193:in `load'' c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.9.1/lib/action_controller/routing.rb:530:in `reload'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:49:in `prepare_application'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/dispatcher.rb:31:in `dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:105:in `handle_dispatch'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:71:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' c:/ruby/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' c:/ruby/lib/ruby/1.8/webrick/server.rb:94:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `each'' c:/ruby/lib/ruby/1.8/webrick/server.rb:89:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/1.8/webrick/server.rb:79:in `start'' c:/ruby/lib/ruby/gems/1.8/gems/rails-0.13.1/lib/webrick_server.rb:57:in `dispatch'' This error occured while loading the following files: ./../config/../config/routes.rb --- I''m using: - ruby 1.8.2 (2004-12-25) [i386-mswin32] - rubygems-0.80.11 - rails-0.13.1 - WEBrick - mysql-4.1.13 Thanks in advance! _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails