From: Mark Meijer Date: 2007-10-02T07:17:17+09:00 Subject: Re: Calling Ruby from PHP fails on "requires 'mysql'" Ok, getting close. The Ruby version called from PHP is indeed different from the Ruby called from command line or crontab.. from PHP /usr/bin/ruby ruby 1.8.2 (2004-12-25) [universal-darwin8.0] otherwise /usr/local/bin/ruby ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.8.2] I tried adding the path to a system call but it doesn't help the ruby call and I don't get anything written to the logs.. $s = sprintf("echo $PATH > /Users/../path0.log 2> /Users/../path1.log"); system($s); $s = sprintf("export PATH=/usr/local/bin:/usr/local/mysql/bin:$PATH"); system($s); $s = sprintf("echo $PATH > /Users/../path2.log 2> /Users/../path3.log"); system($s); -- Posted via http://www.ruby-forum.com/.