mailfactory permissions problem

Discussion in 'Ruby' started by Michael Pope, May 21, 2009.

  1. Michael Pope

    Michael Pope Guest

    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 = ""
    mail.from = ""
    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>
    --
    Posted via http://www.ruby-forum.com/.
     
    Michael Pope, May 21, 2009
    #1
    1. Advertising

  2. Michael Pope

    Michael Pope Guest

    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/*
    --
    Posted via http://www.ruby-forum.com/.
     
    Michael Pope, May 26, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Patrick
    Replies:
    1
    Views:
    527
  2. Usman Shami
    Replies:
    0
    Views:
    441
    Usman Shami
    Jul 14, 2003
  3. Scott Allen
    Replies:
    0
    Views:
    440
    Scott Allen
    Jul 13, 2004
  4. Curt K
    Replies:
    0
    Views:
    566
    Curt K
    Nov 3, 2006
  5. Ben Edwards

    question about mailfactory.

    Ben Edwards, May 30, 2007, in forum: Ruby
    Replies:
    0
    Views:
    79
    Ben Edwards
    May 30, 2007
Loading...

Share This Page