generator-styleguide
generator-styleguide copied to clipboard
Gulp Serve Issues
When attempting to gulp serve I get a gulp notify error "file to import not found or unreadable: bootstrap-variables" in assets/sass/bootstrap.scss:5
After trying to resolve that, I get:
Error in plugin 'gulp-hologram'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
/Library/Ruby/Gems/2.0.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:20: warning: already initialized constant Rouge::Lexers::Shell::KEYWORDS
/Library/Ruby/Gems/2.0.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:20: warning: previous definition of KEYWORDS was here
/Library/Ruby/Gems/2.0.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:25: warning: already initialized constant Rouge::Lexers::Shell::BUILTINS
/Library/Ruby/Gems/2.0.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:25: warning: previous definition of BUILTINS was here
(erb):55:in block in get_binding': undefined method
split' for nil:NilClass (NoMethodError)
from (erb):54:in each' from (erb):54:in
get_binding'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in eval' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in
result'
from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:243:in write_page' from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:199:in
block in write_docs'
from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in each' from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in
write_docs'
from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:147:in build_docs' from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:87:in
build'
from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/cli.rb:38:in build' from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/cli.rb:30:in
run'
from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/bin/hologram:6:in <top (required)>' from /usr/bin/hologram:23:in
load'
from /usr/bin/hologram:23:in `
I'm having similar issues. Any idea what might be happening @tonifisler ?
I'll have a look into that first thing tomorrow. Thanks for reminding me. :wink:
@mandalatv @ebowers
So...
- You first have to run
$ gulp init
to copy the bootstrap-variables file to the correct path. - You then have to change in your
hologram_config.yml
the line withindex: README
toindex: README.md
(just add the .md extension)
And then you're stuck with the Rouge warnings, which are apparently being dealt with but not yet fixed: https://github.com/jneen/rouge/issues/296
@tonifisler After doing this, I was able to get gulp serve to work, but the localhost only shows "Cannot GET / ". Any idea why?
@tonifisler I have just encountered the exact same issue @ebowers has described.
I built a fresh copy of my app on another machine and the error appeared. Added the .md extension and the error went away. But now I notice the index.html file is no longer being generated in the build directory, hence the "Cannot Get / " message in the browser window. Even tried commenting out the index: line altogether with no luck.
Any help tracking down this issue is appreciated!
Update - I have resolved the issue by doing the following:
- commented out the index: line in the hologram config file
- changed the file name of README.md to index.md in my source directory
Here is what tipped me off: https://github.com/Yago/Cortana/issues/23
In case it's useful, I fixed the "Cannot Get /" issue by updating the gulpfile serve task to point to readme.html
server: { baseDir: ['styleguide'], index: "README.html" }