我对ruby和dashing完全陌生,只是在我的机器上安装了它们。
当运行划线开始时,会引发一个神秘的错误。
`require':无法加载此类文件 - 2.0 / ruby_http_parser(LoadError)
任何想法是什么,或如何解决这个问题?
谢谢!
从“潇洒开始”输出
C:\Users\workspace\sweet_dashboard_project>dashing start
C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require': cannot load such file -- 2.0/ruby_http_parser (LoadError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/http_parser.rb-0.5.3-x86-mingw32/lib/ruby_http_parser.rb:2:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/http_parser.rb-0.5.3-x86-mingw32/lib/http_parser.rb:2:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/http_parser.rb-0.5.3-x86-mingw32/lib/http/parser.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/twitter-5.0.0/lib/twitter/streaming/connection.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/twitter-5.0.0/lib/twitter/streaming/client.rb:4:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/twitter-5.0.0/lib/twitter.rb:25:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Users/anders/sweet_dashboard_project/jobs/twitter.rb:1:in `<top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/backports-3.3.5/lib/backports/tools.rb:328:in `require_with_backports'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/dashing-1.3.1/lib/dashing.rb:162:in `block in <top (required)>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/dashing-1.3.1/lib/dashing.rb:162:in `each'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/dashing-1.3.1/lib/dashing.rb:162:in `<top (required)>'
from config.ru:1:in `require'
from config.ru:1:in `block in <main>'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/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 C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `eval'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/rack/adapter/loader.rb:33:in `load'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/controllers/controller.rb:72:in `start'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/runner.rb:200:in `run_command'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.1/lib/thin/runner.rb:156:in `run!'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/thin-1.6.1/bin/thin:6:in `<top (required)>'
from C:/Ruby200/bin/thin:23:in `load'
from C:/Ruby200/bin/thin:23:in `<main>'
答案 0 :(得分:0)
将您的Gemfile编辑为:
gem 'em-websocket', github: 'igrigorik/em-websocket'
Ruby依赖地狱。最有可能与Ruby 1.8,1.9共存。在我的ubuntu 13.10机器上一切正常,但在一个centos 6.5 ruby 1.8默认情况下没有添加1.9。
https://github.com/middleman/middleman-livereload/issues/39
https://github.com/middleman/middleman-livereload/issues/34
答案 1 :(得分:0)
对于任何有兴趣的人,
我重新安装了版本,使用版本1.3.2而不是1.3.1,重新创建了sweet_dashboard_project,捆绑并启动它,现在它正在工作。
安装日志
C:\Users\groover\workspace>ruby -version
ruby 2.0.0p247 (2013-06-27) [i386-mingw32]
-e:1:in `<main>': undefined local variable or method `rsion' for main:Object (NameError)
C:\Users\groover\workspace>gem install dashing
Successfully installed dashing-1.3.2
Parsing documentation for dashing-1.3.2
1 gem installed
C:\Users\groover\workspace>dashing new sweet_dashboard_project
create sweet_dashboard_project
create sweet_dashboard_project/.gitignore
create sweet_dashboard_project/Gemfile
create sweet_dashboard_project/README.md
create sweet_dashboard_project/assets/fonts/fontawesome-webfont.eot
create sweet_dashboard_project/assets/fonts/fontawesome-webfont.svg
create sweet_dashboard_project/assets/fonts/fontawesome-webfont.ttf
create sweet_dashboard_project/assets/fonts/fontawesome-webfont.woff
create sweet_dashboard_project/assets/images/logo.png
create sweet_dashboard_project/assets/javascripts/application.coffee
create sweet_dashboard_project/assets/javascripts/d3-3.2.8.js
create sweet_dashboard_project/assets/javascripts/dashing.gridster.coffee
create sweet_dashboard_project/assets/javascripts/gridster/jquery.gridster.js
create sweet_dashboard_project/assets/javascripts/gridster/jquery.leanModal.min.js
create sweet_dashboard_project/assets/javascripts/jquery.knob.js
create sweet_dashboard_project/assets/javascripts/rickshaw-1.4.3.min.js
create sweet_dashboard_project/assets/stylesheets/application.scss
create sweet_dashboard_project/assets/stylesheets/font-awesome.css
create sweet_dashboard_project/assets/stylesheets/jquery.gridster.css
create sweet_dashboard_project/config.ru
create sweet_dashboard_project/dashboards/layout.erb
create sweet_dashboard_project/dashboards/sample.erb
create sweet_dashboard_project/dashboards/sampletv.erb
create sweet_dashboard_project/jobs/buzzwords.rb
create sweet_dashboard_project/jobs/convergence.rb
create sweet_dashboard_project/jobs/sample.rb
create sweet_dashboard_project/jobs/twitter.rb
create sweet_dashboard_project/lib
create sweet_dashboard_project/public/404.html
create sweet_dashboard_project/public/favicon.ico
create sweet_dashboard_project/widgets/clock/clock.coffee
create sweet_dashboard_project/widgets/clock/clock.html
create sweet_dashboard_project/widgets/clock/clock.scss
create sweet_dashboard_project/widgets/comments/comments.coffee
create sweet_dashboard_project/widgets/comments/comments.html
create sweet_dashboard_project/widgets/comments/comments.scss
create sweet_dashboard_project/widgets/graph/graph.coffee
create sweet_dashboard_project/widgets/graph/graph.html
create sweet_dashboard_project/widgets/graph/graph.scss
create sweet_dashboard_project/widgets/iframe/iframe.coffee
create sweet_dashboard_project/widgets/iframe/iframe.html
create sweet_dashboard_project/widgets/iframe/iframe.scss
create sweet_dashboard_project/widgets/image/image.coffee
create sweet_dashboard_project/widgets/image/image.html
create sweet_dashboard_project/widgets/image/image.scss
create sweet_dashboard_project/widgets/list/list.coffee
create sweet_dashboard_project/widgets/list/list.html
create sweet_dashboard_project/widgets/list/list.scss
create sweet_dashboard_project/widgets/meter/meter.coffee
create sweet_dashboard_project/widgets/meter/meter.html
create sweet_dashboard_project/widgets/meter/meter.scss
create sweet_dashboard_project/widgets/number/number.coffee
create sweet_dashboard_project/widgets/number/number.html
create sweet_dashboard_project/widgets/number/number.scss
create sweet_dashboard_project/widgets/text/text.coffee
create sweet_dashboard_project/widgets/text/text.html
create sweet_dashboard_project/widgets/text/text.scss
C:\Users\groover\workspace>cd sweet_dashboard_project
C:\Users\groover\workspace\sweet_dashboard_project>bundle
Fetching gem metadata from https://rubygems.org/...........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing addressable (2.3.5)
Using atomic (1.1.14)
Installing backports (3.5.0)
Installing buftok (0.2.0)
Installing coffee-script-source (1.7.0)
Using execjs (2.0.2)
Using coffee-script (2.2.0)
Using daemons (1.1.9)
Using rack (1.5.2)
Using thread_safe (0.1.3)
Using tzinfo (1.1.0)
Using rufus-scheduler (2.0.24)
Installing sass (3.2.14)
Installing rack-protection (1.5.2)
Using tilt (1.4.1)
Using sinatra (1.4.4)
Installing multi_json (1.8.4)
Using rack-test (0.6.2)
Installing sinatra-contrib (1.4.2)
Using hike (1.2.3)
Installing sprockets (2.10.1)
Using eventmachine (1.0.3)
Using thin (1.6.1)
Using thor (0.18.1)
Using dashing (1.3.2)
Using descendants_tracker (0.0.3)
Installing equalizer (0.0.9)
Installing multipart-post (2.0.0)
Installing faraday (0.9.0)
Using http_parser.rb (0.6.0)
Using http (0.5.0)
Using json (1.8.1)
Installing memoizable (0.4.0)
Installing naught (1.0.0)
Using simple_oauth (0.2.0)
Installing twitter (5.6.0)
Using bundler (1.3.5)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
C:\Users\groover\workspace\sweet_dashboard_project>dashing start
C:/Users/groover/workspace/sweet_dashboard_project/jobs/twitter.rb:9:in `block in <top (required)>': [DEPRECATION] #oauth_token= is deprecated. Use #access_token= instead.
C:/Users/groover/workspace/sweet_dashboard_project/jobs/twitter.rb:10:in `block in <top (required)>': [DEPRECATION] #oauth_token_secret= is deprecated. Use #access_token_secret= instead.
Thin web server (v1.6.1 codename Death Proof)
Maximum connections set to 1024
Listening on 0.0.0.0:3030, CTRL+C to stop
For the twitter widget to work, you need to put in your twitter API keys in the jobs/twitter.rb file.
127.0.0.1 - - [07/Feb/2014 22:06:18] "GET / HTTP/1.1" 302 - 0.0160
127.0.0.1 - - [07/Feb/2014 22:06:18] "GET /sample HTTP/1.1" 200 2276 0.0090
127.0.0.1 - - [07/Feb/2014 22:06:26] "GET /views/text.html HTTP/1.1" 200 175 0.0050
127.0.0.1 - - [07/Feb/2014 22:06:26] "GET /views/meter.html HTTP/1.1" 200 336 0.0040
127.0.0.1 - - [07/Feb/2014 22:06:26] "GET /views/list.html HTTP/1.1" 200 493 0.0040
127.0.0.1 - - [07/Feb/2014 22:06:26] "GET /views/number.html HTTP/1.1" 200 343 0.0040
127.0.0.1 - - [07/Feb/2014 22:06:26] "GET /views/graph.html HTTP/1.1" 200 167 0.0050
127.0.0.1 - - [07/Feb/2014 22:07:58] "GET /widgets/welcome HTTP/1.1" 200 683 0.0050
127.0.0.1 - - [07/Feb/2014 22:07:58] "GET /favicon.ico HTTP/1.1" 200 5430 0.0060
For the twitter widget to work, you need to put in your twitter API keys in the jobs/twitter.rb file.
For the twitter widget to work, you need to put in your twitter API keys in the jobs/twitter.rb file.