# How to use Rails in stand alone rb-file

**URL:** <https://www.ruby-forum.com/t/how-to-use-rails-in-stand-alone-rb-file/142995>\
**Category:** Rails\
**Created:** [July 14, 2008, 10:48am UTC](https://www.ruby-forum.com/t/how-to-use-rails-in-stand-alone-rb-file/142995 "2008-07-14T10:48:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![falko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9de0a6/32.png) [@falko](https://www.ruby-forum.com/u/falko)\
**Post date:** [July 14, 2008, 10:48am UTC](https://www.ruby-forum.com/t/how-to-use-rails-in-stand-alone-rb-file/142995/1 "2008-07-14T10:48:57Z")

</div>

Good Day.  
I want to run some rb-file via Cron, for inserting data in database. Is  
it possible to use Model from my project, in stand alone rb-file? What  
should i require in rb-File?

---

<div class="post-metadata">

**Author:** ![falko](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/9de0a6/32.png) [@falko](https://www.ruby-forum.com/u/falko)\
**Post date:** [July 14, 2008, 10:56am UTC](https://www.ruby-forum.com/t/how-to-use-rails-in-stand-alone-rb-file/142995/2 "2008-07-14T10:56:42Z")

</div>

Andrev Titov wrote:

> Good Day.  
> I want to run some rb-file via Cron, for inserting data in database. Is  
> it possible to use Model from my project, in stand alone rb-file? What  
> should i require in rb-File?

Thank`s for All,  
I have just found it:  
[http://wiki.rubyonrails.org/rails/pages/HowToUseActiveRecordOutsideRails](http://wiki.rubyonrails.org/rails/pages/HowToUseActiveRecordOutsideRails)
