Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError when I try runing without Bundler #10

Closed
wzpan opened this issue Jun 3, 2013 · 1 comment
Closed

NoMethodError when I try runing without Bundler #10

wzpan opened this issue Jun 3, 2013 · 1 comment

Comments

@wzpan
Copy link

wzpan commented Jun 3, 2013

  • Bundler version: 1.3.5
  • ruhoh version: 2.1
  • RuhuhSpec: 2.1

When I try to preview my draft by using this command

$ rackup -p 9294

I see the following result:

NoMethodError: undefined method `with_index' for #<Array:0x007f2564442948>
    /home/ehome/.gem/ruby/2.0.0/gems/ruhoh-2.1/lib/ruhoh/base/model_view.rb:117:in `summary'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `[]'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `find'
    /home/ehome/.gem/ruby/2.0.0/gems/ruhoh-2.1/lib/ruhoh/views/rmustache.rb:7:in `find'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:99:in `block in fetch'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:95:in `each'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:95:in `fetch'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:77:in `[]'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:97:in `block in render'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:82:in `map'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:82:in `render'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:43:in `render'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache.rb:119:in `render'
    /home/ehome/.gem/ruby/2.0.0/gems/ruhoh-2.1/lib/ruhoh/base/model_view.rb:83:in `content'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `[]'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `find'
    /home/ehome/.gem/ruby/2.0.0/gems/ruhoh-2.1/lib/ruhoh/views/rmustache.rb:7:in `find'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:79:in `block in render'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:78:in `each'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:78:in `inject'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:78:in `render'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache/template.rb:43:in `render'
    /home/ehome/.gem/ruby/2.0.0/gems/mustache-0.99.4/lib/mustache.rb:119:in `render'
    /home/ehome/.gem/ruby/2.0.0/gems/ruhoh-2.1/lib/ruhoh/views/master_view.rb:31:in `render_full'
    /home/ehome/.gem/ruby/2.0.0/gems/ruhoh-2.1/lib/ruhoh/resources/pages/previewer.rb:18:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/urlmap.rb:65:in `block in call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `each'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/urlmap.rb:50:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/showexceptions.rb:24:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:49:in `_call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:37:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/builder.rb:138:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:49:in `_call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/lint.rb:37:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/showexceptions.rb:24:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/chunked.rb:43:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/content_length.rb:14:in `call'
    /home/ehome/.gem/ruby/2.0.0/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
    /usr/lib/ruby/2.0.0/webrick/httpserver.rb:138:in `service'
    /usr/lib/ruby/2.0.0/webrick/httpserver.rb:94:in `run'
    /usr/lib/ruby/2.0.0/webrick/server.rb:295:in `block in start_thread'

If I try to run it with bundler:

$ bundle exec rackup -p 9294

I can see the main page successfully, but another strange problem occurs: I cannot see the code highlighting. I can only see a grey text box for code. The version of ruhoh which bundler executes is 2.1.1.

@wzpan
Copy link
Author

wzpan commented Jun 3, 2013

After replacing the ruhoh-*/lib/ruhoh/base folder from $home/.bundler to $home/.gem I solve the two problem. So the 1st problem must be in the base folder. And there must be something wrong in highlighting the code in ruhoh-2.1.1. 😃

@wzpan wzpan closed this as completed Jun 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant