title: `require': no such file to load -- sinatra/base (LoadError) when running a Sinatra app (resque-web)
body: <p>I'm running the PHP version of Resque and would like to use the Sinatra frontend app that comes with the Ruby version of Resque. (https://github.com/defunkt/resque-web)</p>
  
  <p><strong>Problem:</strong> On my Ubuntu box, I installed Ruby, Gems, and Sinatra. When I tried to start <code>server.rb</code>, I get an error as shown below.</p>
  
  <p>Having almost no experience in Ruby, any help getting this app to work will be awesome :)</p>
  
  <p><strong>Error</strong></p>
  
  <pre><code>server.rb:1:in `require': no such file to load -- sinatra/base (LoadError)
      from server.rb:1
  </code></pre>
  
  <p><strong>What I Did</strong></p>
  
  <pre><code>git clone https://github.com/defunkt/resque-web.git
  sudo apt-get install ruby-full build-essential
  sudo apt-get install rubygems
  gem install sinatra
  cd resque-web
  ruby server.rb
  </code></pre>
  
  <p><strong>Ruby</strong></p>
  
  <pre><code>ruby -v
  ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
  </code></pre>
  
  <hr>
  
  <h2>Attempt 2</h2>
  
  <p>Its probably getting worse...</p>
  
  <p><strong>Added to the top of server.rb</strong></p>
  
  <pre><code>require 'rubygems'
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- resque (LoadError)
  </code></pre>
  
  <hr>
  
  <h2>Attempt 3</h2>
  
  <pre><code>gem install resque
  ruby server.rb
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>[WARNING] MultiJson is using the default adapter (ok_json). We recommend loading a different JSON library to improve performance.
  /var/lib/gems/1.8/gems/resque-1.23.0/lib/resque/helpers.rb:6: Please install the yajl-ruby or json gem (RuntimeError)
          from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
          from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
          from /var/lib/gems/1.8/gems/resque-1.23.0/lib/resque.rb:10
          from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:59:in `gem_original_require'
          from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:59:in `require'
          from server.rb:4
  </code></pre>
  
  <p><strong>Did:</strong></p>
  
  <pre><code>gem install json gem
  ruby server.rb
  </code></pre>
  
  <p><strong>Error</strong></p>
  
  <pre><code>:public is no longer used to avoid overloading Module#public, use :public_folder instead from server.rb:13
  </code></pre>
  
  <hr>
  
  <h2>Attempt 4</h2>
  
  <p>Changed </p>
  
  <pre><code>    set :public, "#{dir}/server/public"
  </code></pre>
  
  <p>to</p>
  
  <pre><code>    set :public_folder, "#{dir}/server/public"
  </code></pre>
  
  <p>Now when I <code>ruby server.rb</code>, nothing happens and I get back the shell...</p>