title: how to execute ruby script from rails view
body: <p>I am new to ruby on rails and trying to build an internal site to manage
  several ruby scripts. What I am trying to accomplish; create web page
  where an user clicks on a link (Execute Analyzer) to execute ruby script
  (runs in the background - FitAnalyzer.rb). I am having trouble
  understanding how to route this without redirecting to another web page.
  I basically need help how to add the correct format to routes.rb.</p>
  <p><strong>analyzer.html.erb</strong></p>
  <pre><code>&lt;%= link_to &quot;![Execute][1] Analyzer&quot;, :controller =&gt;
  'fit_anlayzer_controller', :method =&gt; 'execute_analyzer'%&gt;
  </code></pre>
  <p><strong>fit_analyzer_controller.rb</strong></p>
  <pre><code>class FitAnalyzerController &lt; ApplicationController
    def analyzer
    end
  
    def execute_analyzer
      # Delayed::Job.enqueue(AnalyzerJob.new(params[:id]), 3)
      # command = 'ruby ~/ruby_scripts/fit_analyzer/FitAnalyzer.rb'
      @execute_command = system 'ruby
  /Users/gsypolt/rubyqa_project/ruby_scripts/fit_analyzer/FitAnalyzer.rb'
      flash[:notice] = &quot;Executing FitNesse Analyzer&quot;
    end
  end
  </code></pre>
  <p>When accessing mylocalhost/fit_analyzer/analyzer receiving
  this message below</p>
  <pre><code>No route matches {:controller=&gt;&quot;fit_anlayzer_controller&quot;,
  :method=&gt;&quot;execute_analyzer&quot;, :popup=&gt;true}
  </code></pre>
  <p>I have been learning ruby on rails from lyndia.com and book (rails 3
  way)</p>
  <p>mockup screenshot what i am trying to build</p>