Nyxynyx
Nyxynyx

Reputation: 63619

`require': no such file to load -- sinatra/base (LoadError) when running a Sinatra app (resque-web)

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)

Problem: On my Ubuntu box, I installed Ruby, Gems, and Sinatra. When I tried to start server.rb, I get an error as shown below.

Having almost no experience in Ruby, any help getting this app to work will be awesome :)

Error

server.rb:1:in `require': no such file to load -- sinatra/base (LoadError)
    from server.rb:1

What I Did

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

Ruby

ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

Attempt 2

Its probably getting worse...

Added to the top of server.rb

require 'rubygems'

Error

/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- resque (LoadError)

Attempt 3

gem install resque
ruby server.rb

Error

[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

Did:

gem install json gem
ruby server.rb

Error

:public is no longer used to avoid overloading Module#public, use :public_folder instead from server.rb:13

Attempt 4

Changed

    set :public, "#{dir}/server/public"

to

    set :public_folder, "#{dir}/server/public"

Now when I ruby server.rb, nothing happens and I get back the shell...

Upvotes: 0

Views: 4223

Answers (1)

d33pika
d33pika

Reputation: 2007

Install Resque using gems,gem install resque and just run resque-web from the command line. Refer: github.com/defunkt/resque

Upvotes: 1

Related Questions