Forum: Ruby Including a config file into a local directory

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.
4a88370bcb2987154efe5412a3ca7c55?d=identicon&s=25 eddieroger (Guest)
on 2007-02-25 09: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.
eddieroger
This topic is locked and can not be replied to.