title: Kernel.system call from rails
body: <p>I am invoking a shell script using <code>Kernel.system</code> from my Rails controller. The shell script might invoke another Ruby script based on some conditions. This Ruby script requires the twitter gem. My Rails app is running in apache using Passenger. Now when this Ruby script is invoked from my Rails app, I get the following error in apache logs. </p>
  
  <pre><code>/var/www/webapps/test/twitter/twitter_post.rb:2:in `require': no such file to load -- twitter (LoadError)
          from /var/www/webapps/test/twitter/twitter_post.rb:2
  </code></pre>
  
  <p>The same Ruby script runs fine from the Linux shell. Now, if I list the twitter gem in my Gemfile, it works perfectly. <code>Kernel.system</code> is supposed to invoke the commands in a subshell, so is Rails modifying any environment variables in its execution shell?</p>