# Error Starting Rails - DEPRECATED\_INSTANCE\_VARIABLES

**URL:** <https://www.ruby-forum.com/t/error-starting-rails-deprecated-instance-variables/91875>\
**Category:** Rails\
**Created:** [April 13, 2007, 12:20am UTC](https://www.ruby-forum.com/t/error-starting-rails-deprecated-instance-variables/91875 "2007-04-13T00:20:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [April 13, 2007, 12:20am UTC](https://www.ruby-forum.com/t/error-starting-rails-deprecated-instance-variables/91875/1 "2007-04-13T00:20:52Z")

</div>

Hi,

I’ve got a rails app happily working on my Vista laptop.

I’ve installed a ubuntu slice using VMWorkstation to try & replicate my  
hosting environment.

I think I’ve installed everything as I should, I’m running Edge rails, &  
the below error occurs when I start the server.

Can someone please point me in the right direction to sort this?

rgds,

- matt.

=\> Rails application starting on [http://0.0.0.0:3000](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/matt/Desktop/Rails  
Websites/www.tickex.com/trunk/vendor/rails/activesupport/lib/active\_support/dependencies.rb:477:in  
`const_missing': uninitialized constant ActionController::Base::DEPRECATED_INSTANCE_VARIABLES (NameError) from /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/base.rb:160 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem\_original\_require’  
from  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`require' from /home/matt/Desktop/Rails Websites/www.tickex.com/trunk/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require’  
from /home/matt/Desktop/Rails  
Websites/www.tickex.com/trunk/vendor/rails/activesupport/lib/active\_support/dependencies.rb:342:in  
`new_constants_in' from /home/matt/Desktop/Rails Websites/www.tickex.com/trunk/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require’  
from  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action\_view.rb:25  
from  
/usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:27:in  
`gem_original_require' ... 42 levels... from /home/matt/Desktop/Rails Websites/www.tickex.com/trunk/vendor/rails/activesupport/lib/active_support/dependencies.rb:495:in `require’  
from /home/matt/Desktop/Rails  
Websites/www.tickex.com/trunk/vendor/rails/railties/lib/commands/server.rb:39  
from script/server:3:in `require’  
from script/server:3

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [April 21, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/error-starting-rails-deprecated-instance-variables/91875/2 "2007-04-21T19:29:34Z")

</div>

Matt S. wrote:

> `const\_missing’: uninitialized constant  
> ActionController::Base::DEPRECATED\_INSTANCE\_VARIABLES (NameError)  
> from

I’m running into the same problem on a debian install (not a virtual  
machine). I would appreciate and information you might have discovered  
to help solve this problem!

Jeremy

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [April 21, 2007, 10:48pm UTC](https://www.ruby-forum.com/t/error-starting-rails-deprecated-instance-variables/91875/3 "2007-04-21T22:48:57Z")

</div>

Hi, could you post the relevant code?

-Conrad

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [April 22, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/error-starting-rails-deprecated-instance-variables/91875/4 "2007-04-22T16:41:41Z")

</div>

Conrad T. wrote:

> Hi, could you post the relevant code?
> 
> -Conrad

Hmm. That’s the problem, I don’t know what the relevant code is. This  
happens whenever mongrel\_rails is started. It also happens when I start  
script/console:

$ script/console  
Loading development environment.  
/home/jeremy/sites/dnweb/vendor/rails/activerecord/lib/…/…/activesupport/lib/active\_support/dependencies.rb:477:in  
`const_missing':NameError: uninitialized constant ActionController::Base::DEPRECATED_INSTANCE_VARIABLES /home/jeremy/sites/dnweb/app/controllers/application.rb:2:in`helper’:ArgumentError: wrong number of arguments (1 for 0)

> >

Now, application.rb, line 2, simply has :

helper :all

I don’t see why “helper” would require zero arguments.

We’re using edge rails, the most recent release (as of Friday). It’s  
frozen in our /vendor tree. This same setup works well under OSX but  
fails on debian.

If I remove the vendor/rails tree and let it drop back to the installed  
version of rails (1.2.3) via gem, it fails as well:

$ script/console  
Loading development environment.  
/usr/local/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:328:in  
`send':NoMethodError: undefined method`session=’ for  
ActionController::Base:Class

I suspect there is some version mismatch between rails and something in  
our debian environment. Or perhaps there’s something rails needs that is  
missing. I was hoping someone had seen this problem before and would  
reply “Hey, you just need to do X,Y,Z and it’s easy to fix.” Guess not?  
🙂

---

<div class="post-metadata">

**Author:** ![matthew](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@matthew](https://www.ruby-forum.com/u/matthew)\
**Post date:** [April 23, 2007, 12:58am UTC](https://www.ruby-forum.com/t/error-starting-rails-deprecated-instance-variables/91875/5 "2007-04-23T00:58:33Z")

</div>

Ok, I found the problem(s)… updating to ruby 1.8.5 (had 1.8.4  
previously) fixed the DEPRECATED\_INSTANCE\_VARIABLES error. As for the  
other two errors I had with helper and session:

1. helper problem:

I’m not really sure why, but the following code, in  
app/controllers/application.rb, worked under OSX, using rails 1.2.3 and  
ruby 1.8.5:

class ApplicationController \< ActionController::Base  
helper :all

However, under my debian environment, it failed. So I changed it to load  
the helpers I needed:

class ApplicationController \< ActionController::Base  
helper :css, :text, :list, etc…

1. `send':NoMethodError: undefined method`session=’ for  
ActionController::Base:Class

I had this line in environment.rb:

config.action\_controller.session = { :secret =\> “xxxxxx” }

I remember putting this line in a long time ago when troubleshooting  
problems with sessions. I had read online that this helped. In any case,  
I had to remove it to make the error message go away. It does not seem  
like it was really needed, since the app works now 🙂
