0
votes

I got below error when sending mail from postfix.

Command output: /home/user/.rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- mail (LoadError)

I have created aliases to send mail. In aliases,

user:"|/home/user/.rvm/rubies/ruby-2.2.1/bin/ruby /home/ruby/my_project_path/app/models/get_mail.rb"

When I run this command in terminal, it runs successfully. But not in postfix aliases.

In get_mail.rb, I used require 'mail'

1

1 Answers

1
votes

You can output $LOAD_PATH at console. If path not include, you have to add abs path.