title: mechanize create google alert in ruby on rails
body: <p>I am trying to create google alerts in ruby.  I am using mechanize.</p>
  
  <pre><code>@web_agent = Mechanize.new
  page = @web_agent.get 'https://www.google.com/alerts'
  form = page.form_with :name =&gt; 'f1'
  
  form.q = "search keyword"
  </code></pre>
  
  <p>I am getting <code>nil</code> form value.</p>
  
  <p>I am getting error:</p>
  
  <pre><code>undefined method `q= for nil:NilClass`
  </code></pre>
  
  <p>Google has changed html, so I need some hack.</p>