Hello! I''m having problems running Rails from the command line. Running rails using lighttpd works strangely. This is the output I get: # ./dispatch.cgi ./../config/../vendor/rails/actionpack/lib/action_controller/ request.rb:13:in `method'': undefined method `downcase'' for nil:NilClass (NoMethodError) from ./../config/../vendor/rails/actionpack/lib/ action_controller/request.rb:23:in `post?'' from ./../config/../vendor/rails/actionpack/lib/ action_controller/request.rb:68:in `formatted_post?'' from ./../config/../vendor/rails/actionpack/lib/ action_controller/cgi_process.rb:66:in `request_parameters'' from ./../config/../vendor/rails/actionpack/lib/ action_controller/request.rb:8:in `parameters'' from ./../config/../vendor/rails/actionpack/lib/ action_controller/session_management.rb:104:in `process'' from ./../config/../vendor/rails/actionpack/lib/ action_controller/rescue.rb:20:in `process_with_exception'' from ./../config/../vendor/rails/railties/lib/dispatcher.rb: 32:in `dispatch'' from ./dispatch.cgi:10 Any ideas what could be wrong? Should I supply more information? Thanks, Rob
"Running rails using lighttpd works strangely." Sorry, just to clarify: running my rails app through lighttp *works perfectly*. Just running it using the command line is giving me these errors. I always thought that one can run a rails app from the command line no matter what, but apparently that doesn''t seem to be the case here. Any ideas why I get that errors?
On 9/23/05, Robert <mannl-KK0ffGbhmjU@public.gmane.org> wrote:> "Running rails using lighttpd works strangely." > > Sorry, just to clarify: running my rails app through lighttp *works > perfectly*. > > Just running it using the command line is giving me these errors. > > I always thought that one can run a rails app from the command line > no matter what, but apparently that doesn''t seem to be the case here. > Any ideas why I get that errors?You''re running dispatch.rb? That''s for mod-ruby I believe. If you want to start up your web app in ruby, use webrick: ruby script/server If you want a command-line interface to it, use the console: ruby script/console -- rick http://techno-weenie.net
I''m trying to run either dispatch.cgi, .fcgi, or .rb from the command line. None of them works, and they all spit out the same error (see first post in this thread). Now I''m not quite sure if it is theoritically possible to run them from the command line, but I remember it is. Back when I started doing Rails, and my sites didn''t work, people advised me to try to run it from the command line. But it seems I was mistaken: it is _not_ possible to run rails from the command line for testing purposes. Correct me if that''s wrong, or if it works for you. Thanks, Rob
Robert wrote:> I''m trying to run either dispatch.cgi, .fcgi, or .rb from the command > line. None of them works, and they all spit out the same error (see > first post in this thread). > > Now I''m not quite sure if it is theoritically possible to run them > from the command line, but I remember it is. Back when I started > doing Rails, and my sites didn''t work, people advised me to try to > run it from the command line. > > > > But it seems I was mistaken: it is _not_ possible to run rails from > the command line for testing purposes. > > > > Correct me if that''s wrong, or if it works for you.It used to work, so this looks like a bug. Until this is fixed, you can consider using script run_urls available from http://railsbench.rubyforge.org/ -- Stefan Kaes
Hi Robert, It certainly is possible, I do it on a daily basis with edge Rails.>From RAILS_ROOT (in *nix/BSD/MacOSX):$ script/console or on windows: C:\rails> ruby script\console Cheers, -David Felstead On 9/25/05, Robert <mannl-KK0ffGbhmjU@public.gmane.org> wrote:> I''m trying to run either dispatch.cgi, .fcgi, or .rb from the command > line. None of them works, and they all spit out the same error (see > first post in this thread). > > Now I''m not quite sure if it is theoritically possible to run them > from the command line, but I remember it is. Back when I started > doing Rails, and my sites didn''t work, people advised me to try to > run it from the command line. > > > > But it seems I was mistaken: it is _not_ possible to run rails from > the command line for testing purposes. > > > > Correct me if that''s wrong, or if it works for you. > > > Thanks, > Rob > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >