views:

23

answers:

1

I am writing a JRuby rails app that uses mysql-backed models. Now, I need to update the models from OUTSIDE the app (via EventMachine / similar), so that the Controllers etc IN the rails app can get access to the fresh data.

So, is the Rails ORM available inside EventMachine? Will there be catastrophic consequences if I update the mysql tables from inside EventMachine (if the ORM is not available to me)?

+1  A: 

You could always require 'config/environment.rb', that'll give you access to all the models.

elektronaut
actually, upon reading the book 'JRuby Cookbook', I discovered that doing the following would work (excerpt from the book):require 'rubygems'require 'active_record'require 'yaml'....See the book for more details...
rmk