title: Running foreman from a rake task
body: <p>I have the following Rake task:</p>
  
  <pre><code>namespace :foreman do
    task :dev do
      `foreman start -f Procfile.dev`
    end
  end
  
  desc "Run Foreman using Procfile.dev"
  task :foreman =&gt; 'foreman:dev'
  </code></pre>
  
  <p>The forman command works fine from the shell, however when I run <code>rake foreman</code> I get the following error:</p>
  
  <pre><code>/Users/me/.gem/ruby/2.0.0/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb:240:in `block in replace_gem': foreman is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
      from /Users/me/.gem/ruby/2.0.0/bin/foreman:22:in `&lt;main&gt;'
  </code></pre>
  
  <p>Forman specifically states: </p>
  
  <pre><code>Ruby users should take care not to install foreman in their project's Gemfile
  </code></pre>
  
  <p><strong>So how can I get this task to run?</strong></p>