pages-gem icon indicating copy to clipboard operation
pages-gem copied to clipboard

Permission denied running with docker

Open tabuchid opened this issue 5 years ago • 3 comments

Before submitting an issue, please be sure to

This issue affects

  • [ ] The site generated by GitHub Pages
  • [x] Building sites locally

The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.

What did you do (e.g., steps to reproduce)

source contrib/func.sh
cd ../my-site-path/
github-pages

What did you expect to happen?

My site running in a container

What happened instead?

github-pages:3: command not found: realpath
Configuration file: none
            Source: /src/site
       Destination: /src/site/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 0.006 seconds.
 Auto-regeneration: enabled for '/src/site'
jekyll 3.7.4 | Error:  Permission denied @ dir_s_mkdir - /src/site/_site

Additional information

  • Link to the live site (if applicable):
  • Link to the source repo (if applicable):

tabuchid avatar Jan 22 '19 12:01 tabuchid

Fixed. If running on a mac you can install realpath by running brew install coreutils

I still am having issues getting this container running however. I'm now seeing

$ github-pages
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:91:in `block in materialize': Could not find extras-0.3.0 in any of the sources (Bundler::GemNotFound)
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:in `map!'
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:85:in `materialize'
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:170:in `specs'
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:237:in `specs_for'
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:226:in `requested_specs'
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:108:in `block in definition_method'
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:20:in `setup'
	from /usr/local/lib/ruby/site_ruby/2.5.0/bundler.rb:107:in `setup'
	from /usr/local/bundle/gems/jekyll-3.7.4/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-3.7.4/exe/jekyll:11:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:23:in `load'
	from /usr/local/bundle/bin/jekyll:23:in `<main>'

My Gemfile looks like this https://github.com/tabuchid/tabuchid.github.io/blob/3e8c947f046ea0e6f125a7dc003ef26bb083223f/Gemfile

gem "github-pages", group: :jekyll_plugins
gem "jekyll-assets", group: :jekyll_plugins

tabuchid avatar Jan 22 '19 13:01 tabuchid

Hm, did you run bundle install before running docker build?

parkr avatar Feb 12 '19 01:02 parkr

I'm a little confused. If you have to run bundle install anyway, then how is the docker approach any better?

cdlewis avatar Aug 11 '20 05:08 cdlewis