schacon/showoff

NoMethodError - undefined method `js/sh_lang/sh_bash.min.js'

ravinggenius opened this issue · 9 comments

When running showoff serve, I get the following error and a large stack trace:

NoMethodError - undefined method `js/sh_lang/sh_bash.min.js' for #<ShowOff:0x0000000245e708>:
    showoff-0.7.0/lib/showoff.rb:487:in `block in <class:ShowOff>'

Not sure what's going on there.... Thanks for making such a great, simple presentation library. Let me know if you want help with any of the issues I've just filed (issue #159 and issue #160) (or this one).

+1 - got this too.

Please test master and let me know if this is gone. Thanks!

Just checked out master and the problem persists.

Could you provide me with a failing example? Thanks.

No problem. Here is the presentation that has the issue: https://github.com/ravinggenius/presentations-devise_cancan.

Thanks for your presentation! It helped spotting a situation where we'd add a class "sh_" to pre elements erroneously. That's fixed now.

If you replace @@@ bash with @@@ sh (according to http://shjs.sourceforge.net/doc/documentation.html) you should no longer see these errors.

Cheers!

I made the change you suggested, but now I get another error. See below.

NoMethodError - undefined method `js/sh_lang/sh_.min.js' for #<ShowOff:0x00000003074790>:
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/bundler/gems/showoff-4563f40587b3/lib/showoff.rb:593:in `block in <class:ShowOff>'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1212:in `block in compile!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `[]'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (3 levels) in route!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:801:in `route_eval'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:785:in `block (2 levels) in route!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:822:in `block in process_route'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `catch'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:820:in `process_route'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:784:in `block in route!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `each'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:783:in `route!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:886:in `dispatch!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `block in call!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `block in invoke'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `catch'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871:in `invoke'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:705:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/logger.rb:15:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/head.rb:9:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/showexceptions.rb:21:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `block in call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416:in `synchronize'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334:in `call'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/rack-1.4.1/lib/rack/handler/webrick.rb:59:in `service'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
    /home/thomas/.rbenv/versions/1.9.3-p0/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'

That's exactly what my latest commit was trying to prevent: da71a23

Are you positively sure you're getting this with the most recent changes?

You are correct; my apologies. I must not have bundle updated before trying this time. Thanks for your patience.