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

Not finding rails config when parsing erb files #239

Open
addbrick opened this issue Jul 10, 2015 · 2 comments
Open

Not finding rails config when parsing erb files #239

addbrick opened this issue Jul 10, 2015 · 2 comments

Comments

@addbrick
Copy link

I am not sure if I am describing this correctly so let me know if anything needs clarification.

I have a rails app that is using scss, coffee, and haml. I set up hologram following the readme and pivotal labs post (did not set up grunt).

this is my config file

source: ./app/assets
destination: ./public/styleguide
documentation_assets: ./doc_assets
dependencies:
  - ./build
index: basics
nav_level: all

Some of my .erb files reference Settings which is created by the rails_config gem. Everytime I run bundle exec hologram I get the following error

Adding renderer for haml examples
Adding renderer for html examples
Adding renderer for js examples
Adding renderer for jsx examples
Adding renderer for react examples
Adding renderer for slim examples
(erb):8:in `get_binding': uninitialized constant Hologram::TemplateVariables::Settings (NameError)
    from /Users/addbrick/.rbenv/versions/2.1.2/lib/ruby/2.1.0/erb.rb:850:in `eval'
    from /Users/addbrick/.rbenv/versions/2.1.2/lib/ruby/2.1.0/erb.rb:850:in `result'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:247:in `write_erb'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:197:in `block in write_docs'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `each'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `write_docs'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:147:in `build_docs'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:87:in `build'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/cli.rb:38:in `build'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/lib/hologram/cli.rb:30:in `run'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/gems/hologram-1.4.0/bin/hologram:6:in `<top (required)>'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/bin/hologram:23:in `load'
    from /Users/addbrick/Mightybell/speckel/vendor/bundle/ruby/2.1.0/bin/hologram:23:in `<main>'

It looks like my Settings are not being loaded. I am not sure how to get them to load or why they are not loading in the first place. Any help is appreciated. If I am using it wrong please let me know.

@acconrad
Copy link
Contributor

One thing I noticed was that I didn't want to worry about the Javascript-related things, so I just set my source: ./app/assets/stylesheets and that got everything to work

@addbrick
Copy link
Author

One of my stylesheets is an .erb which can't change. Sad times

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

2 participants