# Behavior Change in Scripts since 1.1?

**URL:** <https://www.ruby-forum.com/t/behavior-change-in-scripts-since-1-1/95258>\
**Category:** Rails\
**Created:** [May 25, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/behavior-change-in-scripts-since-1-1/95258 "2006-05-25T20:53:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 25, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/behavior-change-in-scripts-since-1-1/95258/1 "2006-05-25T20:53:50Z")

</div>

Occasionally we need to run scripts (such as from cron) that have access  
to the rails environment.

Since we’ve upgraded to 1.1 (I believe it coincides with that), all of  
our scripts seem to run as unit tests.

An example (obviously useless), which would be store in the script  
directory:

------BEGIN CODE----------------------------  
RAILS\_ENV = ‘development’  
require File.dirname( **FILE** ) + ‘/…/config/environment’

score = Score.find(:first)

print "Score is: " + score.score.to\_s + “\n”  
------END CODE------------------------------

Outputs:  
------BEGIN OUTPUT----------------------------  
Score is: 183945  
Loaded suite script/superlatives  
Started

Finished in 0.00114 seconds.

0 tests, 0 assertions, 0 failures, 0 errors  
------END OUTPUT------------------------------

Why is the benchmarking/unit test related output coming up?

---

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 25, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/behavior-change-in-scripts-since-1-1/95258/2 "2006-05-25T22:13:28Z")

</div>

On May 25, 2006, at 11:53 AM, Sean Hermany wrote:

> ## ------BEGIN CODE---------------------------- Score is: 183945
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Sean-

```
Thats a very good question. I have just been noticing this myself.

```

Except for me it happens when I run something with script/console.  
Even if I just try to run script/console ‘Post.find :all’ It ouputs  
the same test unit output you show above. I haven’t been able to  
figure out why yet. I’ll let you know if I do.

-Ezra

---

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 25, 2006, 10:20pm UTC](https://www.ruby-forum.com/t/behavior-change-in-scripts-since-1-1/95258/3 "2006-05-25T22:20:15Z")

</div>

On May 25, 2006, at 11:53 AM, Sean Hermany wrote:

> ## ------BEGIN CODE---------------------------- Score is: 183945
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

Sean-

```
I actually just figured out that the file_column plugin was making

```

this happen. For some reason just having the file\_column plugin in  
vendor/plugins was making the test unit output happen. I moved the  
file\_column dir out of the project temporarily and the problem went  
away. So are you running file\_columnn? 😉

-Ezra

---

<div class="post-metadata">

**Author:** ![seanhussey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/a88e57/32.png) [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Post date:** [May 25, 2006, 10:25pm UTC](https://www.ruby-forum.com/t/behavior-change-in-scripts-since-1-1/95258/4 "2006-05-25T22:25:23Z")

</div>

The only plugin I’m using for this particular project is  
tzinfo\_timezone, which I highly doubt would be causing this behavior  
(but then, I don’t know what’s causing this behavior, so who am I to  
say).

Ezra Z. wrote:

> Sean-
> 
> I actually just figured out that the file\_column plugin was making  
> this happen. For some reason just having the file\_column plugin in  
> vendor/plugins was making the test unit output happen. I moved the  
> file\_column dir out of the project temporarily and the problem went  
> away. So are you running file\_columnn? 😉
> 
> -Ezra
