# Rake without code evaluation?

**URL:** <https://www.ruby-forum.com/t/rake-without-code-evaluation/103891>\
**Category:** Rails\
**Created:** [May 11, 2007, 11:25am UTC](https://www.ruby-forum.com/t/rake-without-code-evaluation/103891 "2007-05-11T11:25:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![danny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@danny](https://www.ruby-forum.com/u/danny)\
**Post date:** [May 11, 2007, 11:25am UTC](https://www.ruby-forum.com/t/rake-without-code-evaluation/103891/1 "2007-05-11T11:25:38Z")

</div>

Hey people,

Here’s a problem I have. I have a table inside my database which  
contains ruby/rails code snippets. When I use rake db:fixtures:load and  
it starts to import my snippets table it starts evaluating the code  
snippets inside the table which breaks the rake operation.

Is there a sollution to this problem?

Thanks very much in advance,

Danny

---

<div class="post-metadata">

**Author:** ![danny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@danny](https://www.ruby-forum.com/u/danny)\
**Post date:** [May 14, 2007, 1:47am UTC](https://www.ruby-forum.com/t/rake-without-code-evaluation/103891/2 "2007-05-14T01:47:42Z")

</div>

On 11/05/2007, at 7:25 PM, Danny wrote:

> Here’s a problem I have. I have a table inside my database which  
> contains ruby/rails code snippets. When I use rake db:fixtures:load  
> and  
> it starts to import my snippets table it starts evaluating the code  
> snippets inside the table which breaks the rake operation.

Huh? Code in fields in the database will never get run unless you’ve  
written something to run it!

Can you show some of your code and give some example data?

Pete Y.

> **[Pete Yandell — Principal Engineer / Architect](https://notahat.com/)**
>
> Pete Yandell is an experienced Principal Software Engineer and Architect based in Melbourne, Australia.

---

<div class="post-metadata">

**Author:** ![danny](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@danny](https://www.ruby-forum.com/u/danny)\
**Post date:** [May 14, 2007, 2:31am UTC](https://www.ruby-forum.com/t/rake-without-code-evaluation/103891/3 "2007-05-14T02:31:46Z")

</div>

On 11/05/2007, at 7:25 PM, Danny wrote:

> Here’s a problem I have. I have a table inside my database which  
> contains ruby/rails code snippets. When I use rake db:fixtures:load  
> and it starts to import my snippets table it starts evaluating the  
> code snippets inside the table which breaks the rake operation.

fixtures files are yaml files which can contain ruby code. this lets  
you do things like have a database.yml with conditional configuration  
based on the user, etc. as a guess (i haven’t worked with this), the  
problem lies there, and you’ll need to come up with a way to  
appropriately escape the code.

-faisal
