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

Make running jekyll less irritating #8

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bcl
Copy link

@bcl bcl commented Jun 5, 2018

Every time I need to edit the blog and view it locally something in the
ruby/jekyll stack has changed enough that it doesn't work. So make a
Dockerfile and some instructions to make setting up the environment more
reliable. And separate from the host.

StyleGuide.md Outdated
bundle install --binstubs=/tmp/bin/
bundle exec /tmp/bin/jekyll serve --host=0.0.0.0 --incremental

...then just open http://localhost:4000/ and you're off. On subsquant runs you can reuse the container with:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"subsquant"

@dashea
Copy link

dashea commented Jun 5, 2018

Can the bundle install and bundle exec parts be part of the Dockerfile? Either way it beats what we've got now, so looks good to me besides the spelling error

@dashea
Copy link

dashea commented Jun 5, 2018

Well, there's also this, which matches what happened when I tried to run the bundle stuff locally. I have no clue why it would be different for me:

[user@7571b664425f weldr.io]$ bundle exec /tmp/bin/jekyll serve --host=0.0.0.0 --incremental
Ignoring commonmarker-0.17.9 because its extensions are not built. Try: gem pristine commonmarker --version 0.17.9
Ignoring eventmachine-1.2.7 because its extensions are not built. Try: gem pristine eventmachine --version 1.2.7
Ignoring ffi-1.9.25 because its extensions are not built. Try: gem pristine ffi --version 1.9.25
Ignoring http_parser.rb-0.6.0 because its extensions are not built. Try: gem pristine http_parser.rb --version 0.6.0
Ignoring nokogiri-1.8.2 because its extensions are not built. Try: gem pristine nokogiri --version 1.8.2
Could not find commonmarker-0.17.9 in any of the sources
Run `bundle install` to install missing gems.

If I run those gem pristine commands (with sudo), it works

@bcl
Copy link
Author

bcl commented Jun 5, 2018

If I run those gem pristine commands (with sudo), it works

This continues to be nuts. That's exactly the kind of crap this was supposed to avoid.

Every time I need to edit the blog and view it locally something in the
ruby/jekyll stack has changed enough that it doesn't work. So make a
Dockerfile and some instructions to make setting up the environment more
reliable. And separate from the host.
@bcl
Copy link
Author

bcl commented Jun 5, 2018

Can the bundle install and bundle exec parts be part of the Dockerfile?

My goal was to make this the reliable environment for running the bundle stuff inside of, since it depends on whatever's in the current git repo I think it makes sense to leave that setup for later. If we include it I expect the new failure mode to be that the docker image gets out of date and we end up debugging that instead. But given how much of a mess this already is, maybe it would be better? I don't know.

Add --distribution so that it will use the .lock file contents,
otherwise with the latest fedora:latest container it fails with a bunch
of complaints.

Add vendor to the _config.yml so that jekyll doesn't think it's part of
your site and try to parse things it shouldn't.
@bcl bcl force-pushed the master-container-jekyll branch from f068f5b to 5493418 Compare June 5, 2018 23:46
@bcl
Copy link
Author

bcl commented Jun 5, 2018

Reproduced your problem by removing my fedora:latest image and re-building. Added --deployment which makes it use the .lock file. Which isn't ideal, but it works. For the moment.

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

Successfully merging this pull request may close these issues.

2 participants