# Models not loading?

**URL:** <https://www.ruby-forum.com/t/models-not-loading/114480>\
**Category:** Rails\
**Created:** [September 13, 2007, 6:09am UTC](https://www.ruby-forum.com/t/models-not-loading/114480 "2007-09-13T06:09:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [September 13, 2007, 6:09am UTC](https://www.ruby-forum.com/t/models-not-loading/114480/1 "2007-09-13T06:09:57Z")

</div>

I’ve followed all the installation instructions at

> **[Dan Benjamin](https://danbenjamin.com)**
>
> Dan Benjamin's personal website.

for an OS X install. Everything seems to work fine in that I can  
create a rails project and run rake tasks, migrations, start a server  
etc. But it seems that my models are not being loaded. For example,  
when I try to access a model via the console, I get the following:

?\> User.find(:all)  
NameError: uninitialized constant User  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/  
active\_support/dependencies.rb:266:in `load_missing_constant' from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/ active_support/dependencies.rb:452:in `const\_missing’  
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/  
active\_support/dependencies.rb:464:in `const\_missing’  
from (irb):2

Needless to say, running the server and trying to go to users/index or  
any other action gives me a routing error. For what it’s worth I’m  
on: Rails 1.2.3, Ruby 1.2.6, Mac OS X 10.4.10, Mongrel 1.0.1

I’ve been working with RoR for a few months on windows machines and  
have not run into this issue even after several different  
installations. However, I’ve been working with Windows for many years  
and with Mac only for a few days so it is very possible that I have  
missed something obvious here.

---

<div class="post-metadata">

**Author:** ![miked](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ed655f/32.png) [@miked](https://www.ruby-forum.com/u/miked)\
**Post date:** [September 13, 2007, 6:13am UTC](https://www.ruby-forum.com/t/models-not-loading/114480/2 "2007-09-13T06:13:57Z")

</div>

On Sep 13, 2007, at 12:09 AM, MikeD wrote:

> I’ve followed all the installation instructions at  
> [Dan Benjamin](http://hivelogic.com/narrative/articles/ruby-rails-mongrel-mysql-osx)  
> for an OS X install. Everything seems to work fine in that I can  
> create a rails project and run rake tasks, migrations, start a server  
> etc. But it seems that my models are not being loaded.

You’ve confirmed that the database.yml file is set up correctly?

-faisal
