learny
October 19, 2021, 3:59pm
1
Please excuse such a beginner question.
Running bundle exec jekyll serve
I get:
in `open': **Operation not permitted @ dir_initialize - . (** **Errno::EPERM** **)**
from /Users/user/.gem/ruby/3.0.0/gems/jekyll-4.2.1/lib/jekyll/reader.rb:47:in `entries'
from /Users/user/.gem/ruby/3.0.0/gems/jekyll-4.2.1/lib/jekyll/reader.rb:47:in `block in read_directories'
When I first tried serve I accidentally refused to give jekyll access to photos.
Thank you!
Run with
--trace
And for a lot more detail
--verbose
I don’t know what you mean on permissions and what prompt you got. Jekyll needs to read files in the repo you are working on.
You can try rename or move the directory and run again.
1 Like
learny
October 19, 2021, 4:49pm
3
Hello @MichaelCurrin ,
thanks! verbose did the trick:
The following worked:
bundle add webrick
from:
opened 03:15PM - 25 Dec 20 UTC
closed 09:25PM - 10 Jan 21 UTC
has-pull-request
## My Environment
| Software | Version(s) |
| ---------------- | ---… ------- |
| Operating System | Ubuntu 20.04 |
| Ruby | 3.0.0 |
| `jekyll` | 4.2.0 |
| `github-pages` | No |
---
## Expected Behaviour
`bundle exec jekyll serve` runs on Ruby 3.0.
## Current Behavior
`bundle exec jekyll serve` fails with the following stack trace:
```
/home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `require': cannot load such file -- webrick (LoadError)
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in `<top (required)>'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `require_relative'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in `setup'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:100:in `process'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `block in process_with_graceful_fail'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `each'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in `process_with_graceful_fail'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program'
from /home/argilo/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /home/argilo/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /home/argilo/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /home/argilo/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /home/argilo/.gem/ruby/3.0.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /home/argilo/.gem/ruby/3.0.0/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
from /home/argilo/.gem/ruby/3.0.0/bin/jekyll:23:in `load'
from /home/argilo/.gem/ruby/3.0.0/bin/jekyll:23:in `<top (required)>'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `load'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/cli/exec.rb:63:in `kernel_load'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/cli/exec.rb:28:in `run'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/cli.rb:497:in `exec'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/cli.rb:30:in `dispatch'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/cli.rb:24:in `start'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/libexec/bundle:49:in `block in <top (required)>'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/3.0.0/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /home/argilo/.rubies/ruby-3.0.0/lib/ruby/gems/3.0.0/gems/bundler-2.2.3/libexec/bundle:37:in `<top (required)>'
from /home/argilo/.rubies/ruby-3.0.0/bin/bundle:23:in `load'
from /home/argilo/.rubies/ruby-3.0.0/bin/bundle:23:in `<main>'
```
This happens because webrick is no longer a bundled gem in Ruby 3.0. From https://www.ruby-lang.org/en/news/2020/12/25/ruby-3-0-0-released/:
> The following libraries are no longer bundled gems or standard libraries. Install the corresponding gems to use these features.
> * sdbm
> * webrick
> * net-telnet
> * xmlrpc
Adding `gem "webrick"` to my Gemfile solves the problem, but Jekyll should include it in its gemspec.
1 Like