Forum: Ruby where to put class to run in everything

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
500e92cfb666d6757c317a5df7c7e28d?d=identicon&s=25 Shawn Bright (nephish)
on 2008-12-05 18:31
(Received via mailing list)
Hey there all,

I am using ruby to run both the processing engine for my companies
data provider, ruby in most of the housekeeping cron scripts, and ruby
on rails powers the website. This is all on an Ubuntu linux server.

The thing is, we host a few domain websites that, although very
different, use a lot of the shared code.

What I would like to do is have all my ruby classes and functions that
are common to everything be in one location that I can require from.
I just don't know how I would use them for things like Rails that has
all models in one folder, controllers in another, etc..

Anyone have a solution to share?
thanks
86e33dee4a89a8879a26487051c216a8?d=identicon&s=25 Michael Fellinger (Guest)
on 2008-12-05 19:10
(Received via mailing list)
On Sat, Dec 6, 2008 at 2:24 AM, shawn bright <nephish@gmail.com> wrote:
> are common to everything be in one location that I can require from.
> I just don't know how I would use them for things like Rails that has
> all models in one folder, controllers in another, etc..
>
> Anyone have a solution to share?
> thanks

put it in your filesystem at a place everybody has read access to,
then use the almighty require
500e92cfb666d6757c317a5df7c7e28d?d=identicon&s=25 Shawn Bright (nephish)
on 2008-12-05 19:51
(Received via mailing list)
thanks

On Fri, Dec 5, 2008 at 12:04 PM, Michael Fellinger
This topic is locked and can not be replied to.