title: Ruby Dir.mkdir Usage
body: <p>I am pretty new to ruby and have a very simple ruby script that has the following purpose:</p>
  
  <ol>
  <li>Read lines of file</li>
  <li>Access jira instance using jira4r gem</li>
  <li>Query jira instance for issue(s)</li>
  <li>Create a directory using the issue key and issue summary</li>
  </ol>
  
  <p>I've come to the conclusion after some tinkering that the Dir.mkdir command does not accept the object I am passing it as argument.</p>
  
  <p>Findings:</p>
  
  <ol>
  <li><p>If Dir.mkdir is passed a line, #{chompline},  from my textfile directory creation execute properly.</p></li>
  <li><p>If Dir.mkdir is passed a string consisting of issue.key and issue.summary it chokes with the following error:</p></li>
  </ol>
  
  <p>./readFile.rb:29:in `mkdir': No such file or directory -  (Errno::ENOENT)
      from ./readFile.rb:29</p>
  
  <ol>
  <li>Based on point #1 and #2, it must be something about the string I create from issue key and summary.</li>
  </ol>
  
  <p>I have the following theories/questions:</p>
  
  <ol>
  <li>Is "#{keyPlusSummary}"the correct object type to pass into mkdir as argument ? 
  I believe it to be string, but perhaps I am assuming incorrectly.</li>
  </ol>
  
  <p>Source:</p>
  
  <pre><code>#!/usr/bin/env ruby
  require 'rubygems'
  require 'jira4r'
  require 'FileUtils'
  jira = Jira4R::JiraTool.new(2, "http://jira.somejirainstance.com")
  baseurl = jira.getServerInfo().baseUrl
  puts "Base URL: " + baseurl , "\n"
  jira.login("someUser", "somePassword")
  
  
  
  file = File.new("awkOutput.txt", "r")
  while (line = file.gets)
    chompline = "#{line}".chomp!
    issue = jira.getIssue("#{chompline}")
    keyPlusSummary = "#{issue.key}"+"#{issue.summary}"
    puts keyPlusSummary
    Dir.mkdir "#{keyPlusSummary}"
  end
  file.close
  </code></pre>