How to build and test website locally

Hi - does anyone here do this? I mean pull from
and build this, and open localhost:something and
see at least the top of the website.

Or are you testing some other way? How?

It has been several years, so I’ve forgotten how to do this manually. I realize the links in the website may refer to the canonical URL (now so possibly this doesn’t get very far but I wanted to see.

I tried to follow
and got to step 7, NO_CONTRACTS=true bundle exec middleman
but eventually I run into
$ bundler: failed to load command: middleman (/usr/local/lib/ruby/gems/2.7.0/bin/middleman)

Despite having installed middleman, done the bundler install, etc. I’ve tried setting GEM_ROOT, I’ve checked that /usr/local/opt/ruby/bin/ruby is there, I’ve checked that $GEM_ROOT/middleman-1.2.8 exists, so I must be missing something obvious.


1 Like

Hi Stephen, thanks for asking – I should document this better!

I think is a red herring - it’s how to update the docs for the GitLab product, not the Graphviz docs.

I assume you’re on Mac? Here’s how I run the graphviz docs locally on macOS

# Get a new version of Ruby, as the macOS version is old
$ brew install ruby
# Install all the gems in Gemfile
$ /usr/local/opt/ruby/bin/bundle install
# Start an HTTP server
$ /usr/local/opt/ruby/bin/bundle exec jekyll serve
1 Like

I’ve just added a to the docs repo documenting this:

1 Like

From the README: “Assuming you have a recent Ruby version installed:”

Does this count as recent?

magjac@t440:~/$ ruby --version
ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux]

It sort of works but not fully. The page looks like this:

And the log is:

magjac@t440:~/$ bundle exec jekyll serve
Configuration file: /home/magjac/
            Source: /home/magjac/
       Destination: /home/magjac/
 Incremental build: disabled. Enable with --incremental
                    done in 0.55 seconds.
 Auto-regeneration: enabled for '/home/magjac/'
        ** ERROR: directory is already being watched! **

        Directory: /home/magjac/

        is already being watched through: /home/magjac/

        MORE INFO:
    Server address:
  Server running... press ctrl-c to stop.

That should work… says ruby 2.5.0 is the min requirement.

Looks like the errors are related to file watching. we have some symlinks to directories like Gallery… it worked on my Mac but maybe that doesn’t work with file watching cross platform.

Try removing the Gallery symlink (I think from either / or /_pages/) and see if that works?

1 Like