title: Running RubyGem CLI during development
body: <p>I am starting a new project which will have the need for a CLI.</p>
  
  <p>I have created a new RubyGem project using</p>
  
  <p><code>bundle gem roar</code></p>
  
  <p>So I have structure in place.</p>
  
  <p>To have the CLI I have created a 'bin' folder and added a 'roar' file with the following contents.</p>
  
  <pre><code>require 'roar'
  
  test = Test::Talk.new
  test.say_hello
  </code></pre>
  
  <p>I now want to run the 'roar' bin file that I have created, but if I run the following</p>
  
  <pre><code>ruby bin/roar
  </code></pre>
  
  <p>I get an error stating that ruby cannot find the gem 'roar'.  I am assuming that this is because I am not in the 'environment' so it does not know how to find my library.  So how can I run this so that I can execute the scripts I am writing?</p>
  
  <p>I have a feeling that I can create a helper script for use with IRB, but I cannot work out how to do it.  Any suggestions are gratefully received.</p>
  
  <p>(I am not attempting to circumvent the need for tests, I am trying to get my head around the CLI and I do not want to have to go through the install gem and execute cycle).</p>
  
  <p>Thanks very much,</p>
  
  <p>Russell</p>
  
  <p>UPDATE:</p>
  
  <p>As requested, the layout of my project looks like:</p>
  
  <pre><code>├── Gemfile
  ├── Gemfile.lock
  ├── LICENSE.txt
  ├── README.md
  ├── Rakefile
  ├── bin
  │   └── roar
  ├── lib
  │   ├── roar
  │   │   └── version.rb
  │   └── roar.rb
  ├── roar.gemspec
  ├── spec
  │   ├── roar_spec.rb
  │   └── spec_helper.rb
  └── tmp
  </code></pre>