Forum: Ruby on Rails Problems upgrading from 2.2.2 to 2.3.2 - uninitialized constant ActionController::Failsafe (NameErr

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cb2fd3f2b5456f937a4861ecb789502a?d=identicon&s=25 dkam (Guest)
on 2009-04-19 11:53
(Received via mailing list)
Hi Guys,
   I'm trying to get my app up to rails 2.3.2, but I have a problem -
I can't start the app with Mongrel or Thin, and the "rake middleware"
all return the same error. I'm using the edge version of rails so my
normal dev environment can stay at 2.2.2.

Starting thin, I see:
dkam@Omena ~/Development/rails/booko_rails_2.3 $ thin start
>> Using rails adapter
/Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/actionpack/
lib/action_dispatch/vendor/rack-1.0/rack.rb:17: warning: already
initialized constant VERSION
/Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
activesupport/lib/active_support/dependencies.rb:440:in
`load_missing_constant': uninitialized constant
ActionController::Failsafe (NameError)
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
activesupport/lib/active_support/dependencies.rb:80:in `const_missing'
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
activesupport/lib/active_support/inflector.rb:361:in `constantize'
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
activesupport/lib/active_support/inflector.rb:360:in `each'
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
activesupport/lib/active_support/inflector.rb:360:in `constantize'
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
activesupport/lib/active_support/core_ext/string/inflections.rb:162:in
`constantize'
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
actionpack/lib/action_dispatch/middleware/stack.rb:58:in `=='
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
actionpack/lib/action_dispatch/middleware/stack.rb:97:in `index'
  from /Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
actionpack/lib/action_dispatch/middleware/stack.rb:97:in
`insert_after'
   ... 15 levels...
  from /Library/Ruby/Gems/1.8/gems/thin-1.0.0/lib/thin/runner.rb:139:in
`run!'
  from /Library/Ruby/Gems/1.8/gems/thin-1.0.0/bin/thin:6
  from /usr/bin/thin:19:in `load'
  from /usr/bin/thin:19

Or with Rake:
dkam@Omena ~/Development/rails/booko_rails_2.3 $ rake middleware
(in /Users/dkam/Development/rails/booko_rails_2.3)
rake aborted!
uninitialized constant ActionController::Failsafe

(See full trace by running task with --trace)

Starting the console returns the same error:
dkam@Omena ~/Development/rails/booko_rails_2.3 $ ./script/console
Loading development environment (Rails 2.3.2)
/Users/dkam/Development/rails/booko_rails_2.3/vendor/rails/
activesupport/lib/active_support/dependencies.rb:440:in
`load_missing_constant':NameError: uninitialized constant
ActionController::Failsafe

I'm running Ruby 1.8.6:
$ ruby --version
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

Any ideas on what's causing this and how to fix it?

Cheers,
059ed46172a087063ce26250e44c8627?d=identicon&s=25 Fernando Perez (fernando)
on 2009-04-19 11:59
rename application.rb to application_controller.eb, and next time read
the changelog.
44391f94143d129bdfdcd8b52aa51674?d=identicon&s=25 Schalk Neethling (Guest)
on 2009-04-19 12:13
(Received via mailing list)
Hey Fernando,

You should find this useful:
http://giantrobots.thoughtbot.com/2009/4/15/rails-...

Schalk
Cb2fd3f2b5456f937a4861ecb789502a?d=identicon&s=25 dkam (Guest)
on 2009-04-19 12:32
(Received via mailing list)
Thanks for the suggestion Fernando, but that doesn't seem to be the
problem.

$ ls -trlh app/controllers/
total 32
-rw-r--r--  1 dkam  dkam   890B 15 Apr 22:56 application_controller.rb
-rw-r--r--  1 dkam  dkam    11K 15 Apr 23:00 books_controller.rb

Any other thoughts?

On Apr 19, 7:59 pm, Fernando Perez <rails-mailing-l...@andreas-s.net>
Cb2fd3f2b5456f937a4861ecb789502a?d=identicon&s=25 dkam (Guest)
on 2009-04-20 14:13
(Received via mailing list)
Does anyone have any ideas what causes the "uninitialized constant
ActionController::Failsafe" error?  Anyone else seen this?

Note - it's not the "uninitialized constant ActionController" error
caused by not renaming application.rb to application_controller.rb

Cheers,
Dan
This topic is locked and can not be replied to.