[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Testing ActiveRecord in console

JZ

4/1/2005 11:41:00 PM

How to import and test ActiveRecord using Interactive Ruby Shell? It is not
clear how it shoud be used and I do not know how even to start, eg. how
import module, bind to database etc. (I am used to pythonic interpreter
console.) Is it possible to use Active Record outside of Rails?

--
JZ
2 Answers

threeve.org

4/1/2005 11:51:00 PM

0

On Apr 1, 2005 5:39 PM, JZ <spamerom@niet.com> wrote:
> How to import and test ActiveRecord using Interactive Ruby Shell? It is not
> clear how it shoud be used and I do not know how even to start, eg. how
> import module, bind to database etc. (I am used to pythonic interpreter
> console.) Is it possible to use Active Record outside of Rails?
>

look at script/console from your rails dir.


Zach Thompson

4/2/2005 12:48:00 AM

0

Yes, script/console is great if you have a Rails environment set up,
and there's also:


http://wiki.rubyonrails.com/rails/show/HowToUseActiveRecordOu...

and check out:

http://api.rubyon...

Scroll down to the "ActiveRecord::ConnectionAdapters" in the Classes
frame to find connection parameters for your database.

On Apr 1, 2005, at 3:51 PM, threeve.org wrote:

> On Apr 1, 2005 5:39 PM, JZ <spamerom@niet.com> wrote:
>> How to import and test ActiveRecord using Interactive Ruby Shell? It
>> is not
>> clear how it shoud be used and I do not know how even to start, eg.
>> how
>> import module, bind to database etc. (I am used to pythonic
>> interpreter
>> console.) Is it possible to use Active Record outside of Rails?
>>
>
> look at script/console from your rails dir.
>
>