From: Joshua Ballanco Date: 2008-08-19T10:14:27+09:00 Subject: Re: sharing classes in rails and with other ruby scripts Shawn Bright wrote: > Is there a way i can share this class ( model ) with several different > websites running rails and also use it in my cron jobs, etc.. Well, ActiveRecord is available as it's own gem, and a class which inherits from ActiveRecord does not need the full Rails framework to be useful (a bit of Googling should give you examples of ActiveRecord used outside of Rails...or you could just look at Camping: http://code.whytheluckystiff.net/camping). If you wanted, you could keep your model collection in one place (say, /usr/lib/mycompanysstuff), and then you would just need to modify your environment to require the model classes from there... ...however! If you are constantly accessing the models from Rails apps, it would probably be worth your while to look into setting up a dedicated Rails app to serve up the model data and then access the data from your other apps using ActiveResource. That solution has the advantage of being scalable as well (...and ActiveResource is just dang cool!). -- Posted via http://www.ruby-forum.com/.