我有一个Dashing仪表板,并希望在其中使用Dashing EC2 Cloudfront小部件。小部件的要点是https://gist.github.com/jwalton/6614087,Dashing在这里http://shopify.github.io/dashing/#widgets
我让RVM管理我的红宝石和宝石,并安装了aws-sdk gem以及所有其他宝石。
#lib / dashing_ec2.rb文件导致错误,需要aws-sdk
我不确定该怎么做,因为我研究了Backports并且没有发现任何相关的内容。
这是来自thin.log of Dashing的错误:
/home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require': cannot load such file -- aws-sdk (LoadError)
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
from /opt/opsdash/lib/dashing_ec2.rb:3:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/backports-3.6.0/lib/backports/tools.rb:343:in `require_with_backports'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/dashing-1.3.2/lib/dashing.rb:162:in `block in <top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/dashing-1.3.2/lib/dashing.rb:162:in `each'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/dashing-1.3.2/lib/dashing.rb:162:in `<top (required)>'
from config.ru:1:in `require'
from config.ru:1:in `block in <main>'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
from config.ru:1:in `new'
from config.ru:1:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `eval'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/thin-1.6.2/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/thin-1.6.2/lib/thin/controllers/controller.rb:72:in `start'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/bin/thin:23:in `load'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/bin/thin:23:in `<main>'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/bin/ruby_executable_hooks:15:in `eval'
from /home/ubuntu/.rvm/gems/ruby-2.1.2@dashing/bin/ruby_executable_hooks:15:in `<main>'
答案 0 :(得分:0)
它在我的gemset中,但不在我的Gemfile中。
添加到Gemfile解决了这个问题。
答案 1 :(得分:0)
添加到Gemfile(和bundle install): gem'aws-sdk'
您需要更改“ lib / dashing_ec2.rb ”下的“ lib_dashing_ec2.rb ”(来自要点) 并更改ec2.rb文件中的require: 要求' ./ lib / dashing_ec2'