This is the output i get:
root@marley:/home/rsouthard/projects/inventory# ruby script/server
=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.2.3 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3000
** Starting Rails with development environment...
Exiting
/home/rsouthard/projects/inventory/app/controllers/application.rb:5:in before_filters': wrong number of arguments (1 for 0) (ArgumentError)
from /home/rsouthard/projects/inventory/app/controllers/application.rb:5
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:382:inload_without_new_constant_marking'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:382:in load_file'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:381:in load_file'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:256:inrequire_or_load'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:221:in depend_on'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:133:inrequire_dependency'
from /home/rsouthard/projects/inventory/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:20
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:in call'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:182:inevaluate_method'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:166:in call'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:inrun'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in each'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:insend'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:90:in run'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/callbacks.rb:277:inrun_callbacks'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:559:in send'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:559:inprepare_dispatcher'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:173:in process'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:112:insend'
from ./script/../config/../vendor/rails/railties/lib/initializer.rb:112:in run'
from /home/rsouthard/projects/inventory/config/environment.rb:13
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in require'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:inrequire'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in new_constants_in'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:inrequire'
from /usr/lib/ruby/1.8/mongrel/rails.rb:147:in rails'
from /usr/lib/ruby/1.8/mongrel_rails:114:incloaker_'
from /usr/lib/ruby/1.8/mongrel/configurator.rb:149:in call'
from /usr/lib/ruby/1.8/mongrel/configurator.rb:149:inlistener'
from /usr/lib/ruby/1.8/mongrel_rails:100:in cloaker_'
from /usr/lib/ruby/1.8/mongrel/configurator.rb:50:incall'
from /usr/lib/ruby/1.8/mongrel/configurator.rb:50:in initialize'
from /usr/lib/ruby/1.8/mongrel_rails:85:innew'
from /usr/lib/ruby/1.8/mongrel_rails:85:in run'
from /usr/lib/ruby/1.8/mongrel/command.rb:212:inrun'
from /usr/lib/ruby/1.8/mongrel_rails:282
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in load_without_new_constant_marking'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:142:inload'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in new_constants_in'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:142:inload'
from /home/rsouthard/projects/inventory/vendor/rails/railties/lib/commands/servers/mongrel.rb:64
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in gem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:inrequire'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in require'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:innew_constants_in'
from /home/rsouthard/projects/inventory/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in require'
from /home/rsouthard/projects/inventory/vendor/rails/railties/lib/commands/server.rb:49
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require'
from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from script/server:3
Here is my application.rb file:
#added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
before_filters :authenticate
helper :all # include all helpers, all the time
# See ActionController::RequestForgeryProtection for details
# Uncomment the :secret if you're not using the cookie session store
protect_from_forgery # :secret => '4c5b23214f61143c4957b30c72169daf'
# See ActionController::Base for details
# Uncomment this to filter the contents of submitted sensitive data parameters
# from your application log (in this case, all fields with names like "password").
# filter_parameter_logging :password
private
def authenticate
authenticate_or_request_with_http_basic do |username, password|
username == "admin" && password == "h@x0rz"
end
end
end