Giter VIP home page Giter VIP logo

Comments (10)

dewski avatar dewski commented on June 22, 2024

Could you paste your config/routes.rb file? Or at least confirm it has mount Kss::Engine => '/styleguide'.

from kss-rails.

stoplion avatar stoplion commented on June 22, 2024

I can confirm it's in routes file..
mount Kss::Engine => '/kss' if Rails.env.development?

Should this be in routes as well?
mount Kss::Engine => '/styleguide'

from kss-rails.

dewski avatar dewski commented on June 22, 2024

You changed the original issue after I commented on it. You mentioned you were trying to get /styleguide? What happens when you go to /kss, and have you restarted the server?

from kss-rails.

stoplion avatar stoplion commented on June 22, 2024

I can navigate to http://localhost:4000/kss/ There it displays some links, Home and Styleguide. Styleguide is where i get the above error on line two <h3><%= section.section %> <em><%= section.filename %></em></h3>

from kss-rails.

dewski avatar dewski commented on June 22, 2024

I'll need the full backtrace to give a deeper look, undefined method[]' for nil:NilClass` and whatever else comes after that.

from kss-rails.

stoplion avatar stoplion commented on June 22, 2024

undefined method `[]' for nil:NilClass

Extracted source (around line #2):

1: <div class="styleguide-example">
2:   <h3><%= section.section %> <em><%= section.filename %></em></h3>
3:   <div class="styleguide-description">
4:     <p><%= section.description %></p>
5:     <% if section.modifiers.any? %>

Trace of template inclusion: app/views/kss/home/styleguide.html.erb

app/views/kss/home/styleguide.html.erb:1:in `_app_views_kss_home_styleguide_html_erb___1281663321373551429_2526041660'

from kss-rails.

JAndritsch avatar JAndritsch commented on June 22, 2024

Sounds like you're might be trying to call "styleguide_block" with a section that doesn't exist in your CSS. For example, if you want to call "styleguide_block '1.0' ", you have to make sure you have "Styleguide 1.0" somewhere in one of your CSS files. That was at least my issue when I first started using this.

from kss-rails.

jankeesvw avatar jankeesvw commented on June 22, 2024

I've had this questions several times in my team, I have fixed this by adding an error when the section is nil.

Undefined styleguide

from kss-rails.

jankeesvw avatar jankeesvw commented on June 22, 2024

More descriptive error with my this patch: #18

from kss-rails.

jankeesvw avatar jankeesvw commented on June 22, 2024

This issue can be closed, it's fixed!

from kss-rails.

Related Issues (16)

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.