Forum: Ruby Including a config file into a local directory

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
eddieroger (Guest)
on 2007-02-25 10:11
(Received via mailing list)
Hello group,

I'm working on a library for accessing MediaWiki wikies through its
new API, and I had a question about a config file and gem
distribution. I'd like for my include to look in the working directory
for a file called 'config.yaml' that will hold a set of variables for
accessing the wiki - namely, the API URI, username and password. I
have a backup plan if there's just no way to do this, but I'm new to
gems, and thought maybe there was a way to include a basic config
template file that would install somewhere besides where gems normally
go. Any insight?

An example: Writing a wikibot that named "Sentinel". The Ruby program
requires the gem I create, and is run using 'ruby sentinel.rb'. I'd
like it to look in whatever directory sentinel.rb lives for my file. I
hope that helps.

Thanks in advance.
This topic is locked and can not be replied to.