Code Monkey home page Code Monkey logo

Comments (8)

jamesarosen avatar jamesarosen commented on June 15, 2024

Adding code ||= '' to Rocco::Layout#sections fixes the problem, but I bet there's an underlying cause I'm not seeing.

from rocco.

Wilfred avatar Wilfred commented on June 15, 2024

I'm seeing the same issue with some Python files I'm running Rocco on. The simplest test case I could find was:

""":
"""
f

from rocco.

jamesarosen avatar jamesarosen commented on June 15, 2024

Possibly the same as #40

from rocco.

zpatten avatar zpatten commented on June 15, 2024

/home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/rocco-0.7/lib/rocco/layout.rb:30:in `sections': undefined method `empty?' for nil:NilClass (NoMethodError)
    from /home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/rocco-0.7/lib/rocco/layout.rb:20:in `map'
    from /home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/rocco-0.7/lib/rocco/layout.rb:20:in `sections'
    from /home/zpatten/.rvm/gems/ree-1.8.7-2011.03/gems/mustache-0.99.4/lib/mustache/context.rb:135:in `[]'

I'm seeing this issue with some Ruby files in a Rails lib folder. Default Rocco, no customization.

from rocco.

rtomayko avatar rtomayko commented on June 15, 2024

Did this commit fix the issue for you guys?

4c4ef24

I'm shipping out an 0.8 release that includes it now.

from rocco.

jamesarosen avatar jamesarosen commented on June 15, 2024

Sadly, I can't say for sure. We had to remove Rocco because it kept causing the following error in our application (see #45):

ArgumentError: wrong number of arguments (0 for 1)
[PROJECT_ROOT]/vendor/bundle/ruby/1.8/gems/activerecord-2.3.10/lib/active_record/named_scope.rb, line 186

We tried moving Rocco to its own bundler group, but that didn't help.

from rocco.

zpatten avatar zpatten commented on June 15, 2024

I encountered this error running against our (large) code base. This completely resolved the issue for us.

from rocco.

Wilfred avatar Wilfred commented on June 15, 2024

No, the issue remains. The test case I gave above still produces the error.

from rocco.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.