From: Ryan Davis Date: 2010-12-15T18:10:32+09:00 Subject: Re: No such file to load -- rubygems (LoadError) On Dec 15, 2010, at 00:55 , Chih tung Chao wrote: > Hi all > > I have use ruby to write a shell script to send email automatic, then i > use "#ruby auto_send_mail_for_hk.rb" command to test it and all is > correct, but i got following error when i set it to crontab tast for > automatic run > > Please help me, thanks > > > /root/scripts/auto_send_mail_for_hk.rb:7:in `require': No such file to > load -- rubygems (LoadError) > from /root/scripts/auto_send_mail_for_hk.rb:7 env | grep RUBY you're probably activating rubygems via your environment. Your script should have: require "rubygems" before requiring your email gem.