I create my rails app, with modifications to the default from a script. Having had to upgrade rails once, and knowing that this is likely to happen again because of the rapid updating of rails, it seems the most sensible way to do it. As a result, I often do /bin/rm -rf csestore and then run my script from another window to repopulate it. So naturally, to save having to cd into csestore, and back out again afterwards I invoked webrick with csestore/script/server I got the following huge list of errors as a result: <quote> MissingSourceFile in <controller not set>#<action not set> No such file to load -- csestore/script/../config/../config/routes.rb RAILS_ROOT: csestore/script/../config/.. Application Trace | Framework Trace | Full Trace /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:207:in `load'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:207:in `load'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/routing.rb:555:in `reload'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:69:in `prepare_application'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:37:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:117:in `handle_dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:83:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:69:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:214:in `require'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/commands/server.rb:28 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:214:in `require'' csestore/script/server:3 /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:207:in `load'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:207:in `load'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/routing.rb:555:in `reload'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:69:in `prepare_application'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:37:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:117:in `handle_dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:83:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:69:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:214:in `require'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/commands/server.rb:28 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:214:in `require'' csestore/script/server:3 /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:207:in `load'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:207:in `load'' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.0/lib/action_controller/routing.rb:555:in `reload'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:69:in `prepare_application'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/dispatcher.rb:37:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:117:in `handle_dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:83:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'' /usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'' /usr/local/lib/ruby/1.8/webrick/server.rb:155:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:144:in `start_thread'' /usr/local/lib/ruby/1.8/webrick/server.rb:94:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `each'' /usr/local/lib/ruby/1.8/webrick/server.rb:89:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/1.8/webrick/server.rb:79:in `start'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/webrick_server.rb:69:in `dispatch'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/commands/servers/webrick.rb:59 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:214:in `require'' /usr/local/lib/ruby/gems/1.8/gems/rails-0.14.3/lib/commands/server.rb:28 /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'' /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require'' /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.3/lib/active_support/dependencies.rb:214:in `require'' csestore/script/server:3 This error occured while loading the following files: csestore/script/../config/../config/routes.rb Request Parameters: None Show session dump --- flash: !ruby/hash:ActionController::Flash::FlashHash {} Response Headers: {"cookie"=>[], "Cache-Control"=>"no-cache"} </quote> Well, this message is wrong, because routes.rb does exist, on the path which it claims it does not, but that should not make any difference no matter from where I invoke the server. The paths should be sorted out in there somewhere. It works correctly if I do (cd csestore ; script/server ) i.e. invoke a subshell instead. So: where do I report this as a bug if not here? I can see nothing on http://www.rubyonrails.com/ http://documentation.rubyonrails.com/ http://weblog.rubyonrails.com/ about reporting bugs, and http://bugs.rubyonrails.com/ just takes me back to http://www.rubyonrails.com/ Thank you, Hugh
Francois Beausoleil
2005-Nov-22 19:05 UTC
Re: Error messages: relative paths seem weakly handled?
Hi ! 2005/11/22, Hugh Sasse <hgs@dmu.ac.uk>:> So naturally, to save having to cd into csestore, and back out again > afterwards I invoked webrick with > > csestore/script/serverThe server script is designed to be invoked in RAILS_ROOT. If you are somewhere else, then Rails will think that's your RAILS_ROOT, and obviously, it will not find it's stuff. You are right though in saying that RAILS_ROOT could be deduced from the main program that invoked Rails. To report bugs and enhancements, go to http://dev.rubyonrails.com/, which is the "Source" link on the main Ruby on Rails home page. Not very obvious, I agree. Bye ! -- François Beausoleil http://blog.teksol.info/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Tue, 22 Nov 2005, Francois Beausoleil wrote:> > Hi ! > > 2005/11/22, Hugh Sasse <hgs-C9usXPTk/FFaa/9Udqfwiw@public.gmane.org>: > > So naturally, to save having to cd into csestore, and back out again > > afterwards I invoked webrick with > > > > csestore/script/server > > The server script is designed to be invoked in RAILS_ROOT. If you are > somewhere else, then Rails will think that''s your RAILS_ROOT, and > obviously, it will not find it''s stuff. > > You are right though in saying that RAILS_ROOT could be deduced fromIt IS deduced from it, and it gets it right!> the main program that invoked Rails. To report bugs and enhancements, > go to http://dev.rubyonrails.com/, which is the "Source" link on the > main Ruby on Rails home page. Not very obvious, I agree.Not very obvious at all. OK, thanks.> > Bye ! > -- > Franois Beausoleil > http://blog.teksol.info/ >Thank you, Hugh>_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails