# ArgumentError with Acts as Authenticated

**URL:** <https://www.ruby-forum.com/t/argumenterror-with-acts-as-authenticated/91506>\
**Category:** Rails\
**Created:** [April 10, 2007, 12:02am UTC](https://www.ruby-forum.com/t/argumenterror-with-acts-as-authenticated/91506 "2007-04-10T00:02:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nielsene](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/bc79bd/32.png) [@nielsene](https://www.ruby-forum.com/u/nielsene)\
**Post date:** [April 10, 2007, 12:02am UTC](https://www.ruby-forum.com/t/argumenterror-with-acts-as-authenticated/91506/1 "2007-04-10T00:02:02Z")

</div>

I posted a previous error that I thought was attributed to attachment  
fu but after ripping all the attachment fu code out I’m running into  
similar error with acts as authenticated when I try to post several  
files consecutively to a server regardless of whether I do anything  
with them or not. Here’s the error I get

ArgumentError (A copy of AuthenticatedSystem has been removed from the  
module tree but is still active!):  
C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/  
active\_support/dependencies.rb:237:in `load_missing_constant' C:/ruby/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/ active_support/dependencies.rb:452:in `const\_missing’  
/lib/authenticated\_system.rb:11:in `current_user' /lib/authenticated_system.rb:6:in `logged\_in?’  
/lib/authenticated\_system.rb:53:in `login_required' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:456:in `call’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/filters.rb:435:in `call' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/filters.rb:637:in `call\_filter’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/filters.rb:619:in `perform_action_without_benchmark' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:in `perform\_action\_without\_rescue’  
C:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/benchmarking.rb:66:in `perform\_action\_without\_rescue’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/rescue.rb:83:in `perform_action' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/base.rb:430:in `process\_without\_filters’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/filters.rb:624:in  
`process_without_session_management_support' C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/ action_controller/session_management.rb:114:in `process’  
C:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/  
action\_controller/base.rb:330:in `process' C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.2/lib/dispatcher.rb:41:in `dispatch’  
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/  
rails.rb:78:in `process' C:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize’  
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/  
rails.rb:76:in `process' C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/ mongrel.rb:618:in `process\_client’  
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/  
mongrel.rb:617:in `process_client' C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/ mongrel.rb:736:in `run’  
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/  
mongrel.rb:736:in `run' C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/ mongrel.rb:720:in `run’  
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/  
configurator.rb:271:in `run' C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/ configurator.rb:270:in `run’  
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/bin/  
mongrel\_rails:127:in `run' C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/lib/mongrel/ command.rb:211:in `run’  
C:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.0.1-mswin32/bin/  
mongrel\_rails:243  
C:\ruby\bin\mongrel\_rails:18  
-e:3

The method called to process the posted file does nothing other than  
render success

def add\_image  
render :text =\> ‘success’, :status =\> 200  
end

If I comment out the ‘before\_filter :login\_required’ the error goes  
away. I did find the following link,  
[http://rubyforge.org/forum/message.php?msg\_id=13497](http://rubyforge.org/forum/message.php?msg_id=13497),  
which seems to pertain to the problem but I’m not sure the best way to  
go about fixing it.

---

<div class="post-metadata">

**Author:** ![nielsene](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/bc79bd/32.png) [@nielsene](https://www.ruby-forum.com/u/nielsene)\
**Post date:** [April 10, 2007, 1:30am UTC](https://www.ruby-forum.com/t/argumenterror-with-acts-as-authenticated/91506/2 "2007-04-10T01:30:09Z")

</div>

Adding “require ‘authenticated\_system’” to application.rb solved this  
problem.
