Forum: Ruby mailfactory permissions problem

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.
F489461d74587fdb9087f45047d90e32?d=identicon&s=25 Michael Pope (map7)
on 2009-05-21 08:13
I'm running ruby 1.8 under FreeBSD 7.0 and I'm trying to use mailfactory
for normal users (ie: not admin users).

If I start my script as a privileged user such as root or a person in
the wheel group I don't have a problem. If I start the script as a
normal user though I get this error:

<code>
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original
_require': no such file to load -- mailfactory (LoadError)
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
        from ./test.rb:8
</code>

Here is the script I'm trying to get working correctly:

<code>
#!/usr/bin/env ruby

require 'rubygems'
require 'net/smtp'
require 'mailfactory'
require 'logger'

    mail = MailFactory.new()
    mail.to = "test@test.com.au"
    mail.from = "test@test.com.au"
    mail.subject = "Testing"
    mail.text = "testing"

    begin
       Net::SMTP.start("mail.lan", 25){ |smtp|
           smtp.send_message(mail.to_s(), mail.from, [mail.to,
mail.from])
       }
    rescue Exception => e
        print "Exception occured: " + e
    end
</code>
F489461d74587fdb9087f45047d90e32?d=identicon&s=25 Michael Pope (map7)
on 2009-05-26 03:41
SOLVED.

Had to change permissions from 774 to 775 on the following directories
/usr/local/lib/ruby/gems
/usr/local/lib/ruby/gems/1.8
/usr/local/lib/ruby/gems/1.8/*
This topic is locked and can not be replied to.