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

Running jekyll server locally #148

Closed
mooreryan opened this issue Aug 8, 2022 · 8 comments
Closed

Running jekyll server locally #148

mooreryan opened this issue Aug 8, 2022 · 8 comments

Comments

@mooreryan
Copy link
Contributor

mooreryan commented Aug 8, 2022

To run the jekyll server locally with Ruby v3, I needed to add gem 'webrick', '~> 1.7' to the Gemfile.

Note: If you are using Ruby 3.0 and Jekyll 4.2.x or older, you will need to add the webrick gem to your project's Gemfile prior to running bundle install. (source)

Adding this to the Gemfile lets you run the jekyll server locally both on v2 and v3 (I tested on Ruby versions 2.7.2 and 3.1.2).

If you would like, I could open a pull request for this.

@mooreryan
Copy link
Contributor Author

One other suggestion: it may be a good idea to link somewhere about how to set up a local test version of the ocamlverse webpage for new contributors.

This github page has some instructions on how to do it, so it may be enough to link that page somewhere on the contributing page.

@bluddy
Copy link
Member

bluddy commented Aug 9, 2022

Feel free to open a PR for this requirement. So long as ocamlverse keeps running as is, I'm happy to keep up with the toolchain.

In general, I don't really care about running ocamlverse locally, but if you want to contribute a page about it (maybe under 'About OCamlverse', which needs to be updated anyway since it's no longer a "new" resource), I'd be happy to add it. You could put a Meta tag on it so it shows up on the left menu under Meta.

@mooreryan
Copy link
Contributor Author

Sure I will put something together in a few days.

Question...if you aren't running the site locally, do you have another way to preview changes?

@bluddy
Copy link
Member

bluddy commented Aug 9, 2022

I just update on github and look at the changes, fixing as needed. The formatting is pretty constant at this point, so it's just content that changes.

@bbatsov
Copy link
Collaborator

bbatsov commented Aug 17, 2022

To run the jekyll server locally with Ruby v3, I needed to add gem 'webrick', '~> 1.7' to the Gemfile.

Might be better to just do a bundle update (it's necessary from time to time). I agree it'd be nice to document how people to use Jekyll locally, or at the very least mention that the site is built using Jekyll and point to the official docs.

@mooreryan
Copy link
Contributor Author

That could be the case that only a bundle update is needed. The tip to explicitly add webrick to the Gemfile was from the GitHub docs, and it did work for me once I added it, but I don't remember if I tried just a bundle update first.

Eventually I plan to open a pull request for this, but I won't get to it for a couple weeks, so if anyone else wants to first, feel free :)

@bbatsov
Copy link
Collaborator

bbatsov commented Aug 18, 2022

I've added some docs here #151

Webrick is needed in Ruby 3 because it was removed from the standard library (see https://bugs.ruby-lang.org/issues/17303). I can add a note about it later. I'm still using Ruby 2.7 myself, as at work we haven't migrated to 3.0+ yet.

@mooreryan
Copy link
Contributor Author

Seems like #151 and #158 cover everything in my original issue.

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

3 participants