Tools.rb:328:in `require': cannot load such file -- JSON (LoadError)

Hi there,

I am trying to get dashing to work well. Please let me know what
system details will be helpful to post. Let me show the failure this
time :slight_smile:

:~/sweet_dashboard_project# bundle
Using backports (3.3.3)
Using coffee-script-source (1.6.3)
Using execjs (2.0.0)
Using coffee-script (2.2.0)
Using daemons (1.1.9)
Using rack (1.5.2)
Using tzinfo (1.0.1)
Using rufus-scheduler (2.0.23)
Using sass (3.2.10)
Using rack-protection (1.5.0)
Using tilt (1.4.1)
Using sinatra (1.4.3)
Using multi_json (1.7.9)
Using rack-test (0.6.2)
Using sinatra-contrib (1.4.1)
Using hike (1.2.3)
Using sprockets (2.10.0)
Using eventmachine (1.0.3)
Using thin (1.5.1)
Using thor (0.18.1)
Using dashing (1.2.0)
Using multipart-post (1.2.0)
Using faraday (0.8.8)
Using json (1.8.0)
Using libv8 (3.16.14.3)
Using mime-types (1.24)
Using ref (1.0.5)
Using rest-client (1.6.7)
Using simple_oauth (0.2.0)
Using therubyracer (0.12.0)
Using twitter (4.8.1)
Using bundler (1.3.5)
Your bundle is complete!
Use bundle show [gemname] to see where a bundled gem is installed.
root@:~/sweet_dashboard_project# dashing start
/var/lib/gems/1.9.1/gems/backports-3.3.3/lib/backports/tools.rb:328:in
require’: cannot load such file – JSON (LoadError)
from
/var/lib/gems/1.9.1/gems/backports-3.3.3/lib/backports/tools.rb:328:inrequire_with_backports’
from /root/sweet_dashboard_project/lib/query-graphite.rb:2:in <top
(required)>’
from
/var/lib/gems/1.9.1/gems/backports-3.3.3/lib/backports/tools.rb:328:inrequire’
from
/var/lib/gems/1.9.1/gems/backports-3.3.3/lib/backports/tools.rb:328:in
require_with_backports’
from /var/lib/gems/1.9.1/gems/dashing-1.2.0/lib/dashing.rb:156:inblock
in ’
from /var/lib/gems/1.9.1/gems/dashing-1.2.0/lib/dashing.rb:156:in each’
from /var/lib/gems/1.9.1/gems/dashing-1.2.0/lib/dashing.rb:156:in’
from config.ru:1:in require’
from config.ru:1:inblock in ’
from /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:in
instance_eval’
from
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/builder.rb:55:ininitialize’
from config.ru:1:in new’
from config.ru:1:in’
from
/var/lib/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:in
eval’
from
/var/lib/gems/1.9.1/gems/thin-1.5.1/lib/rack/adapter/loader.rb:33:inload’
from
/var/lib/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:181:in
load_rackup_config’
from
/var/lib/gems/1.9.1/gems/thin-1.5.1/lib/thin/controllers/controller.rb:71:instart’
from /var/lib/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:187:in
run_command’
from /var/lib/gems/1.9.1/gems/thin-1.5.1/lib/thin/runner.rb:152:inrun!’
from /var/lib/gems/1.9.1/gems/thin-1.5.1/bin/thin:6:in <top (required)>’
from /usr/local/bin/thin:23:inload’
from /usr/local/bin/thin:23:in `’

root@:~/sweet_dashboard_project# ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

here is my Gemfile:

:~/sweet_dashboard_project# cat Gemfile
source ‘https://rubygems.org’

gem ‘json’
require ‘rubygems’
require ‘json’

gem ‘dashing’

Remove this if you don’t need a twitter widget.

gem ‘twitter’

gem ‘execjs’
gem ‘therubyracer’
gem ‘rest-client’

Any clues?

Cheers

On Wed, Aug 28, 2013 at 12:10 AM, Noah [email protected] wrote:

ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

:~/sweet_dashboard_project# cat Gemfile
source ‘https://rubygems.org’

gem ‘json’
require ‘rubygems’
require ‘json’

  1. why in the world are you trying to do this as root?

  2. why are you not using the default Gemfile that dashing generates?
    I don’t see the reason for requiring rubygems and json there.

I just did a quick test on 1.9.3p448 and dashing installs and works
for me out of the box…

On 8/28/13 6:07 AM, Hassan S. wrote:

  1. why in the world are you trying to do this as root?

  2. why are you not using the default Gemfile that dashing generates?
    I don’t see the reason for requiring rubygems and json there.

I just did a quick test on 1.9.3p448 and dashing installs and works
for me out of the box…

thanks Hassah - its working for me now.

Cheers