# Console not working

**URL:** <https://www.ruby-forum.com/t/console-not-working/183110>\
**Category:** Rails\
**Created:** [February 8, 2010, 10:37am UTC](https://www.ruby-forum.com/t/console-not-working/183110 "2010-02-08T10:37:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Trausti\_Thor\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5daacb/32.png) [@Trausti\_Thor\_J](https://www.ruby-forum.com/u/Trausti_Thor_J)\
**Post date:** [February 8, 2010, 10:37am UTC](https://www.ruby-forum.com/t/console-not-working/183110/1 "2010-02-08T10:37:39Z")

</div>

I just installed Centos 5.4 64 bit. Nothing out of the ordinary, but  
this is a plain vanilla installation with ruby enterprise and  
passenger.

My app works as it should, but when I try to run ‘script/console’ it  
does not load my models. I have to manually load them. Does anyone  
know why this happens ? I can’t see any errors in any logs.

If I do strace on the command it gives me tens of thousands of lines,  
pretty much just trying to load every variant of every file located  
anyplace inside rails until it works.

Any help would be greatly appreciated.

Trausti

---

<div class="post-metadata">

**Author:** ![Trausti\_Thor\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5daacb/32.png) [@Trausti\_Thor\_J](https://www.ruby-forum.com/u/Trausti_Thor_J)\
**Post date:** [February 11, 2010, 12:18am UTC](https://www.ruby-forum.com/t/console-not-working/183110/2 "2010-02-11T00:18:13Z")

</div>

This seems to be contagious as now my Mac and other linux boxes that I  
know have worked, don’t work any more.

When I start script/console, I get the prompt but no application  
objects, no models, no database.

What am I doing that is so wrong that the application it self works  
like a charm, but I can’t test stuff in the console ?

Can this be because of ruby enterprise ?

Best regards,

Trausti

On Mon, Feb 8, 2010 at 10:36 AM, Trausti Thor J.

---

<div class="post-metadata">

**Author:** ![Trausti\_Thor\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5daacb/32.png) [@Trausti\_Thor\_J](https://www.ruby-forum.com/u/Trausti_Thor_J)\
**Post date:** [February 11, 2010, 12:44am UTC](https://www.ruby-forum.com/t/console-not-working/183110/3 "2010-02-11T00:44:32Z")

</div>

Trausti Thor J. wrote:

> This seems to be contagious as now my Mac and other linux boxes that I  
> know have worked, don’t work any more.
> 
> When I start script/console, I get the prompt but no application  
> objects, no models, no database.
> 
> What am I doing that is so wrong that the application it self works  
> like a charm, but I can’t test stuff in the console ?

How should we know? You haven’t provided any code. Why not use git  
bisect to see where this problem started happening?

> Can this be because of ruby enterprise ?

I doubt that extremely.

> Best regards,
> 
> Trausti
> 
> On Mon, Feb 8, 2010 at 10:36 AM, Trausti Thor J.

Best,  
–Â  
Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Trausti\_Thor\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5daacb/32.png) [@Trausti\_Thor\_J](https://www.ruby-forum.com/u/Trausti_Thor_J)\
**Post date:** [February 11, 2010, 3:20pm UTC](https://www.ruby-forum.com/t/console-not-working/183110/4 "2010-02-11T15:20:51Z")

</div>

There is no code really. I just create a new app like

rails newapp

then wait

cd newapp

script/generate model user username:string

Then I go to the database and enter a few users

then I run script/console  
and type

allusers = User.all

except there is no User object to be found. I can’t just type in U  
and press tab twice, this is what I get

UDPSocket UDPsocket UNIXServer UNIXSocket UNIXserver  
UNIXsocket URI UnboundMethod

No User.

Hope this helps,

Trausti

On Thu, Feb 11, 2010 at 12:44 AM, Marnen Laibow-Koser

---

<div class="post-metadata">

**Author:** ![Trausti\_Thor\_J](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/5daacb/32.png) [@Trausti\_Thor\_J](https://www.ruby-forum.com/u/Trausti_Thor_J)\
**Post date:** [February 11, 2010, 3:26pm UTC](https://www.ruby-forum.com/t/console-not-working/183110/5 "2010-02-11T15:26:43Z")

</div>

On Feb 11, 2:18 pm, Trausti Thor J. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Then I go to the database and enter a few users
> 
> then I run script/console  
> and type
> 
> allusers = User.all

So that throws a const\_missing error ?

Fred
