Skip to content
This repository has been archived by the owner on Nov 13, 2022. It is now read-only.

Can't build locally #449

Closed
mpariente opened this issue Nov 8, 2020 · 9 comments
Closed

Can't build locally #449

mpariente opened this issue Nov 8, 2020 · 9 comments
Labels
bug Something isn't working

Comments

@mpariente
Copy link

When I try to run the code locally, it doesn't work. I've read several linked issues but couldn't find a solution.

What I tried/did:

I'm a complete noob with Docker, jekyll and ruby deps and I'd really love some help on that.

Required information

  1. Steps to reproduce the problem
git clone https://github.com/mpariente/fastmp
cd fastmp
make build
make server
  1. Logs
$ make server
docker-compose down --remove-orphans || true;
Removing network fastmp_default
docker-compose up
Creating network "fastmp_default" with the default driver
Creating fastmp_fastpages_1 ... done
Creating fastmp_jekyll_1    ... done
Creating fastmp_notebook_1  ... done
Creating fastmp_converter_1 ... done
Creating fastmp_watcher_1   ... done
Attaching to fastmp_watcher_1, fastmp_fastpages_1, fastmp_converter_1, fastmp_notebook_1, fastmp_jekyll_1
converter_1  | Agent pid 7
converter_1  | === Running Locally: All assets expected to be in the directory /data ===
fastpages_1  | Agent pid 7
fastpages_1  | === Running Locally: All assets expected to be in the directory /data ===
watcher_1    | Agent pid 14
watcher_1    | === Running Locally: All assets expected to be in the directory /data ===
fastpages_1  | No notebooks were modified
converter_1  | No notebooks were modified
watcher_1    | No notebooks were modified
notebook_1   | [I 18:45:24.228 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
fastmp_fastpages_1 exited with code 0
fastmp_converter_1 exited with code 0
notebook_1   | [W 18:45:24.464 NotebookApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
notebook_1   | [I 18:45:24.466 NotebookApp] Serving notebooks from local directory: /data
notebook_1   | [I 18:45:24.466 NotebookApp] Jupyter Notebook 6.1.4 is running at:
notebook_1   | [I 18:45:24.466 NotebookApp] http://2649c3ea3d97:8080/
notebook_1   | [I 18:45:24.466 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
jekyll_1     | ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux-musl]
jekyll_1     | Configuration file: /data/_config.yml
jekyll_1     | /usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `mkdir': Permission denied @ dir_s_mkdir - /data/.jekyll-cache (Errno::EACCES)
jekyll_1     | 	from /usr/local/lib/ruby/2.7.0/fileutils.rb:250:in `fu_mkdir'
jekyll_1     | 	from /usr/local/lib/ruby/2.7.0/fileutils.rb:228:in `block (2 levels) in mkdir_p'
jekyll_1     | 	from /usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `reverse_each'
jekyll_1     | 	from /usr/local/lib/ruby/2.7.0/fileutils.rb:226:in `block in mkdir_p'
jekyll_1     | 	from /usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `each'
jekyll_1     | 	from /usr/local/lib/ruby/2.7.0/fileutils.rb:211:in `mkdir_p'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/cache.rb:184:in `dump'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/cache.rb:101:in `[]='
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/cache.rb:45:in `clear_if_config_changed'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:118:in `reset'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/site.rb:35:in `initialize'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:30:in `new'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/build.rb:30:in `process'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `each'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
jekyll_1     | 	from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
jekyll_1     | 	from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
jekyll_1     | 	from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
jekyll_1     | 	from /usr/gem/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
jekyll_1     | 	from /usr/gem/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
jekyll_1     | 	from /usr/gem/gems/jekyll-4.1.1/exe/jekyll:15:in `<top (required)>'
jekyll_1     | 	from /usr/local/bundle/bin/jekyll:29:in `load'
jekyll_1     | 	from /usr/local/bundle/bin/jekyll:29:in `<main>'

and this goes on forever.

@mpariente mpariente added the bug Something isn't working label Nov 8, 2020
@github-actions
Copy link

github-actions bot commented Nov 8, 2020

Thank you for opening an issue. If this issue is related to a bug, please follow the steps and provide the information outlined in the Troubleshooting Guide. Failure to follow these instructions may result in automatic closing of this issue.

@hamelsmu
Copy link
Member

hamelsmu commented Nov 8, 2020

Try sudo make server

@mpariente
Copy link
Author

It's in the list of things I tried.. I detailed that part on purpose.

And I think that's a bad idea in general because it'll install deps with sudo, which not everybody wants.

@mpariente
Copy link
Author

It seemed like a cache problem, so I looked into disabling the cache in jekyll, I added the disable_disk_cache: true to my _config.yml (see jekyll PR). The error changed but it still didn't work.

Then, I tried to find out where things were installed, hit this issue which suggested this fix:

gem update bundler
bundle install

Finally I hit the same problem of "Permission denied": ... Permission denied @ dir_s_mkdir - /data/_site. After running mkdir _site, local deployment works.

Hopefully, this helps the next one(s) that has this problem.

@hamelsmu
Copy link
Member

hamelsmu commented Nov 9, 2020

@mpariente thanks for sharing. I'll try to think of a way to fix this

@hamelsmu
Copy link
Member

hamelsmu commented Nov 9, 2020

Do you have to keep removing the _site directory? I just pushed a change to Make that perhaps will help.

@mpariente
Copy link
Author

I had to create it.
Now that it's created, I don't have to do anything when I want to rebuild again.

I also checked that I owned the folder and I did.

@hamelsmu
Copy link
Member

hamelsmu commented Nov 9, 2020

ok thanks for sharing

@abarbosa94
Copy link

I had the same error and got it working after the mkdir _site inside my project repo.

Thanks for sharing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants