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

bundle / cri/option_parser / foreman interaction error #1243

Closed
jm3 opened this issue Nov 10, 2017 · 24 comments
Closed

bundle / cri/option_parser / foreman interaction error #1243

jm3 opened this issue Nov 10, 2017 · 24 comments

Comments

@jm3
Copy link

jm3 commented Nov 10, 2017

bundle exec foreman start used to correctly run nanoc view without complaint; now nanoc errors with a cri/option_parser error. Running the two individual commands in foreman's Procfile works fine:

Procfile:

watch: bundle exec guard
nanoc_view: bundle exec nanoc view

% bundle exec guard

14:03:59 - INFO - Compilation succeeded.
14:03:59 - INFO - LiveReload is waiting for a browser to connect.
14:03:59 - INFO - Guard is now watching at 'jm3.net'
[1] guard(main)>

% bundle exec nanoc view

View the site at http://127.0.0.1:3000/
[2017-11-10 14:04:20] INFO  WEBrick 1.3.1
[2017-11-10 14:04:20] INFO  ruby 2.4.0 (2016-12-24) [x86_64-darwin16]
[2017-11-10 14:04:20] INFO  WEBrick::HTTPServer#start: pid=11520 port=3000

but

% bundle exec foreman start

which runs the same two commands, now bombs with a cri/option_parse error:

watch.1      | started with pid 11581
nanoc_view.1 | started with pid 11582
nanoc_view.1 |
nanoc_view.1 | Captain! We’ve been hit!
nanoc_view.1 |
nanoc_view.1 | LoadError: cannot load such file -- cri/option_parser
nanoc_view.1 |
nanoc_view.1 |   0. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:369:in `require'
nanoc_view.1 |   1. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:369:in `partition'
nanoc_view.1 |   2. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:265:in `run'
nanoc_view.1 |   3. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli.rb:63:in `block in run'
nanoc_view.1 |   4. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli/error_handler.rb:66:in `handle_while'
nanoc_view.1 |   5. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli/error_handler.rb:24:in `handle_while'
nanoc_view.1 |   6. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli.rb:61:in `run'
nanoc_view.1 |   7. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/bin/nanoc:18:in `<top (required)>'
nanoc_view.1 |   8. ~/vendor/bundle/ruby/2.4.0/bin/nanoc:22:in `load'
nanoc_view.1 |   9. ~/vendor/bundle/ruby/2.4.0/bin/nanoc:22:in `<top (required)>'
nanoc_view.1 |   ... 17 lines omitted (see crash.log for details)
nanoc_view.1 |
nanoc_view.1 | A detailed crash log has been written to ./crash.log.
nanoc_view.1 | exited with code 1
system       | sending SIGTERM to all processes
Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)

Ruby version 2.4.0, Gemfile:

source 'https://rubygems.org'
ruby '2.4.0'

group :development do
  gem 'adsf'             # for nanoc view
  gem 'foreman'          # process-manager to start guard + rackup
  gem 'guard-livereload' # enable guard to reload browser when files change
  gem 'guard-nanoc'      # watch files, i guess? no idea, rtfm
  gem 'guard-rack'       # enable guard to HUP webserver when low-level stuff changes
  gem 'rack'             # HTTP-layer middleware manager
  gem 'rack-livereload'  # inject livereload code into the page in development
  gem 'dotenv'           # save / load environment variables - used for AWS keys
  gem 'rake'
  gem 'pry'
  gem 'nanoc'

  gem 'sass'             # css shit
  gem 'uglifier'         # js post-processing

  gem 'builder'          # required for XML sitemaps
  gem 'haml'             # simple templates
  gem 'slim'             # experimenting with alternate template engine
end

crash.log

Crashlog created at 2017-11-10 14:07:05 -0800

===== MESSAGE:

LoadError: cannot load such file -- cri/option_parser

===== STACK TRACE:

0. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:369:in `require'
1. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:369:in `partition'
2. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:265:in `run'
3. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli.rb:63:in `block in run'
4. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli/error_handler.rb:66:in `handle_while'
5. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli/error_handler.rb:24:in `handle_while'
6. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli.rb:61:in `run'
7. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/bin/nanoc:18:in `<top (required)>'
8. ~/vendor/bundle/ruby/2.4.0/bin/nanoc:22:in `load'
9. ~/vendor/bundle/ruby/2.4.0/bin/nanoc:22:in `<top (required)>'
10. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/cli/exec.rb:75:in `load'
11. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/cli/exec.rb:75:in `kernel_load'
12. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/cli/exec.rb:28:in `run'
13. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/cli.rb:424:in `exec'
14. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
15. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
16. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
17. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/cli.rb:27:in `dispatch'
18. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
19. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/cli.rb:18:in `start'
20. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/exe/bundle:30:in `block in <top (required)>'
21. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/bundler/friendly_errors.rb:122:in `with_friendly_errors'
22. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/exe/bundle:22:in `<top (required)>'
23. /usr/local/bin/bundle:22:in `load'
24. /usr/local/bin/bundle:22:in `<main>'
25. ~/.rvm/gems/ruby-2.4.0/bin/ruby_executable_hooks:15:in `eval'

===== VERSION INFORMATION:

Nanoc 4.8.11 © 2007-2017 Denis Defreyne.
Running ruby 2.4.0 (2016-12-24) on x86_64-darwin16 with RubyGems 2.6.8.

===== SYSTEM INFORMATION:

Darwin mac 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64

===== INSTALLED GEMS:

bundler 1.16.0.pre.3

===== LOAD PATHS:

0. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib
1. ~/vendor/bundle/ruby/2.4.0/gems/ref-2.0.0/lib
2. ~/.rvm/gems/ruby-2.4.0/gems/bundler-1.16.0.pre.3/lib/gems/bundler-1.16.0.pre.3/lib
3. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0
4. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/x86_64-darwin16
5. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby
6. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/vendor_ruby/2.4.0
7. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/vendor_ruby/2.4.0/x86_64-darwin16
8. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/vendor_ruby
9. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0
10. ~/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/x86_64-darwin16
@denisdefreyne
Copy link
Member

I’ve experienced bundle exec within bundle exec acting up weird. I suggest either

  • calling foreman as foreman rather than bundle exec foreman
  • editing the Procfile to not include bundle exec

My preference goes out to the former. Can you let me know whether or not either of these approaches work?

@jm3
Copy link
Author

jm3 commented Nov 11, 2017

Oh interesting. I didn't catch the double-bundle, that's a good point. I tried it both ways and still no luck, tho: with bundle exec on foreman invocation but not on the Procfile commands, and vice versa.

I also tried deleting my whole bundle directory and re-bundling in case I had a bad old gem around or something, but no difference.

Does Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)point to anything else we could investigate?

@denisdefreyne
Copy link
Member

Can you share the crash.log for that error? I don't recognize it and would like to investigate.

Can you also run "gem pristine --all" and see whether or not the error persists?

@jm3
Copy link
Author

jm3 commented Nov 11, 2017

this is after running gem pristine --all:

be foreman start
13:46:26 watch.1      | started with pid 21750
13:46:26 nanoc_view.1 | started with pid 21751
13:46:26 nanoc_view.1 |
13:46:26 nanoc_view.1 | Captain! We’ve been hit!
13:46:26 nanoc_view.1 |
13:46:26 nanoc_view.1 | LoadError: cannot load such file -- cri/option_parser
13:46:26 nanoc_view.1 |
13:46:26 nanoc_view.1 |   0. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:369:in `require'
13:46:26 nanoc_view.1 |   1. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:369:in `partition'
13:46:26 nanoc_view.1 |   2. ~/vendor/bundle/ruby/2.4.0/gems/cri-2.10.1/lib/cri/command.rb:265:in `run'
13:46:26 nanoc_view.1 |   3. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli.rb:63:in `block in run'
13:46:26 nanoc_view.1 |   4. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli/error_handler.rb:66:in `handle_while'
13:46:26 nanoc_view.1 |   5. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli/error_handler.rb:24:in `handle_while'
13:46:26 nanoc_view.1 |   6. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/lib/nanoc/cli.rb:61:in `run'
13:46:26 nanoc_view.1 |   7. ~/vendor/bundle/ruby/2.4.0/gems/nanoc-4.8.11/bin/nanoc:18:in `<top (required)>'
13:46:26 nanoc_view.1 |   8. ~/vendor/bundle/ruby/2.4.0/bin/nanoc:22:in `load'
13:46:26 nanoc_view.1 |   9. ~/vendor/bundle/ruby/2.4.0/bin/nanoc:22:in `<top (required)>'
13:46:26 nanoc_view.1 |   ... 17 lines omitted (see crash.log for details)
13:46:26 nanoc_view.1 |
13:46:26 nanoc_view.1 | A detailed crash log has been written to ./crash.log.
13:46:27 watch.1      | 13:46:27 - INFO - Compilation succeeded.
13:46:27 watch.1      |
13:46:27 watch.1      | 13:46:27 - INFO - LiveReload is waiting for a browser to connect.
13:46:27 watch.1      | 13:46:27 - INFO - Guard is now watching at '~/jm3.net'
Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
13:46:27 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
13:46:27 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
13:46:27 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
13:46:27 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
13:46:27 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
13:46:27 watch.1      | FATAL: Pry failed to get user input using `Readline`.
13:46:27 watch.1      | To fix this you may be able to pass input and output file descriptors to pry directly. e.g.
13:46:27 watch.1      |   Pry.config.input = STDIN
13:46:27 watch.1      |   Pry.config.output = STDOUT
13:46:27 watch.1      |   binding.pry
13:46:27 watch.1      |
13:46:27 - INFO - Bye bye...
13:46:27 nanoc_view.1 | exited with code 1
13:46:27 system       | sending SIGTERM to all processes
13:46:27 watch.1      | exited with code 0

@denisdefreyne
Copy link
Member

Can you confirm that you’ve copy-pasted the entire ===== LOAD PATHS section? It only has 10 entries, but it should have many more I believe.

I’m wondering whether this problem is related to the use of autoload in cri. When using Bundler, require behaves differently, but autoload does not. I don’t need autoload and I will remove it; perhaps that will fix the issue. I’m still unsure how this could become a problem, however…

@denisdefreyne
Copy link
Member

denisdefreyne commented Nov 13, 2017

Can you change your Gemfile to load cri from GitHub (master branch):

gem 'cri', github: 'ddfreyne/cri'

… and check whether the problem still exist?

@jm3
Copy link
Author

jm3 commented Nov 13, 2017

% cat Gemfile

source 'https://rubygems.org'
ruby '2.4.0'

group :development do
  gem 'adsf'
  gem 'foreman'
  gem 'guard-livereload
  gem 'guard-nanoc'
  gem 'guard-rack'
  gem 'rack'
  gem 'rack-livereload'
  gem 'dotenv'
  gem 'rake'
  gem 'pry'
  gem 'nanoc'
  gem 'cri', github: 'ddfreyne/cri'

  gem 'sass'
  gem 'uglifier'

  gem 'builder'
  gem 'haml'
  gem 'slim'
end

% foreman start
14:36:47 watch.1      | started with pid 86345
14:36:47 nanoc_view.1 | started with pid 86346
14:36:47 nanoc_view.1 | Could not find the required 'adsf' gem, which is necessary for the view command.
14:36:48 nanoc_view.1 | exited with code 1
14:36:48 system       | sending SIGTERM to all processes
14:36:48 watch.1      | bundler: failed to load command: guard (~/vendor/bundle/ruby/2.4.0/bin/guard)
14:36:48 watch.1      | SignalException: SIGTERM
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/bin/guard:57:in `wait2'
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/bin/guard:57:in `wait_ignoring_interrupts'
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/bin/guard:104:in `block in auto_restart'
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/bin/guard:103:in `loop'
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/bin/guard:103:in `auto_restart'
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/bin/guard:114:in `<top (required)>'
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/bin/guard:22:in `load'
14:36:48 watch.1      |   ~/vendor/bundle/ruby/2.4.0/bin/guard:22:in `<top (required)>'
14:36:48 watch.1      | 14:36:48 - INFO - Compilation succeeded.
14:36:48 watch.1      |
14:36:48 watch.1      | 14:36:48 - INFO - LiveReload is waiting for a browser to connect.
14:36:48 watch.1      | 14:36:48 - INFO - Guard is now watching at '~/jm3.net'
Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:36:48 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:36:48 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:36:48 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:36:48 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:36:48 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:36:48 watch.1      | FATAL: Pry failed to get user input using `Readline`.
14:36:48 watch.1      | To fix this you may be able to pass input and output file descriptors to pry directly. e.g.
14:36:48 watch.1      |   Pry.config.input = STDIN
14:36:48 watch.1      |   Pry.config.output = STDOUT
14:36:48 watch.1      |   binding.pry
14:36:48 watch.1      |
14:36:48 - INFO - Bye bye...
14:36:48 watch.1      | exited with code 1

% bundle exec foreman start
14:37:12 watch.1      | started with pid 86409
14:37:12 nanoc_view.1 | started with pid 86410
14:37:13 nanoc_view.1 | Could not find the required 'adsf' gem, which is necessary for the view command.
14:37:13 watch.1      | 14:37:13 - INFO - Compilation succeeded.
14:37:13 watch.1      |
14:37:13 watch.1      | 14:37:13 - INFO - LiveReload is waiting for a browser to connect.
14:37:14 watch.1      | 14:37:14 - INFO - Guard is now watching at '~/jm3.net'
Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:37:14 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:37:14 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:37:14 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:37:14 watch.1      | Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `output='
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:228:in `set_readline_output'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:183:in `block in read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:129:in `handle_read_errors'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:170:in `read_line'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:98:in `read'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:68:in `block in repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `loop'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:67:in `repl'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `block in start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:61:in `__with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/input_lock.rb:79:in `with_ownership'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:38:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/repl.rb:13:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/pry-0.11.2/lib/pry/pry_class.rb:192:in `start'
14:37:14 watch.1      | ~/vendor/bundle/ruby/2.4.0/gems/guard-2.14.1/lib/guard/jobs/pry_wrapper.rb:102:in `block (2 levels) in _switch_to_pry'
14:37:14 watch.1      | FATAL: Pry failed to get user input using `Readline`.
14:37:14 watch.1      | To fix this you may be able to pass input and output file descriptors to pry directly. e.g.
14:37:14 watch.1      |   Pry.config.input = STDIN
14:37:14 watch.1      |   Pry.config.output = STDOUT
14:37:14 watch.1      |   binding.pry
14:37:14 watch.1      |
14:37:14 - INFO - Bye bye...
14:37:14 nanoc_view.1 | exited with code 1
14:37:14 system       | sending SIGTERM to all processes
14:37:14 watch.1      | exited with code 0

@denisdefreyne
Copy link
Member

Some questions:

  • Did you run bundle after changing the Gemfile?
  • Does the Procfile still have bundle exec for everything?

This error has me stumped.

@denisdefreyne
Copy link
Member

@jm3 I’m still at a loss w.r.t this error — can you answer the questions above?

@jm3
Copy link
Author

jm3 commented Nov 16, 2017

I deleted the whole bundle and re-bundled to make sure that it was clean, using your git branch source for ddfreyne/cri.

I tried the Procfile with bundle exec and without bundle exec, and pasted the errors above.

@denisdefreyne
Copy link
Member

Can you try removing gem 'foreman' from the Gemfile? The foreman README states

Ruby users should take care not to install foreman in their project's Gemfile.

@jm3
Copy link
Author

jm3 commented Nov 17, 2017

  • removed foreman from the bundle
  • uninstall foreman completely (all versions) and reinstalled it
  • made sure all gems are updated to latest
  • bundle is updated to latest

result: no change; removing foreman from the bundle yields the same error, guard 2.14.1 => pry 0.11.2 => Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)

@denisdefreyne
Copy link
Member

There are two separate issues here:

  • Error: wrong argument type Nanoc::CLI::CleaningStream (expected File)
  • Any LoadError, either Could not find the required 'adsf' gem … or LoadError: cannot load such file -- cri/option_parser

The wrong argument type error happens because foreman sets stdout not to be a tty, and pry’s dependency readline expects a non-tty stdout to be a File object, which is not the case here.

You can get around that, I believe, by configuring stdout/stdin for pry:

Pry.config.input = STDIN
Pry.config.output = STDOUT

That should get rid of the wrong argument type error.

The LoadError still leaves me confused, because adsf is in your Gemfile, so requiring adsf should really not raise a LoadError. Puzzling…

@denisdefreyne
Copy link
Member

@jm3 What error do you get when you run without pry? (Remove pry from the Gemfile)

@denisdefreyne
Copy link
Member

Nevermind that question — pry is a dependency so you can’t run without it.

However, changing the Procfile to read

watch: bundle exec guard -i

rather than

watch: bundle exec guard

(thus, add -i) will make the wrong argument type errors disappear.

I still cannot reproduce the Could not find the required … error though :(

@denisdefreyne
Copy link
Member

@jm3 Do you have a reproduction case for me? I fail to find out what’s wrong.

@jm3
Copy link
Author

jm3 commented Nov 18, 2017

Oh wow, ugh. It looks like it was the -i option to guard:

foreman start
15:24:06 watch.1      | started with pid 97565
15:24:06 nanoc_view.1 | started with pid 97566
15:24:06 nanoc_view.1 | [2017-11-18 15:24:06] INFO  WEBrick 1.3.1
15:24:06 nanoc_view.1 | [2017-11-18 15:24:06] INFO  ruby 2.4.0 (2016-12-24) [x86_64-darwin16]
15:24:06 nanoc_view.1 | [2017-11-18 15:24:06] INFO  WEBrick::HTTPServer#start: pid=97566 port=3000
15:24:07 watch.1      | 15:24:07 - INFO - Compilation succeeded.
15:24:07 watch.1      |
15:24:07 watch.1      | 15:24:07 - INFO - LiveReload is waiting for a browser to connect.
15:24:07 watch.1      | 15:24:07 - INFO - Guard is now watching at '~/jm3.net'

Thanks for your help isolating that. Starts fine now, with and without bundle exec in the Procfile.

@jm3 jm3 closed this as completed Nov 18, 2017
@denisdefreyne
Copy link
Member

denisdefreyne commented Nov 19, 2017

Glad to hear!

By the way, I’m working on making the live-recompilation part of Nanoc more integrated (easier to set up and use, as well as faster). If you don’t mind living on the edge, you can:

  1. Update the Gemfile to use nanoc from master:

    gem 'nanoc', github: 'nanoc/nanoc'
  2. Add more dependencies to Gemfile:

    gem 'listen'
    gem 'eventmachine'
    gem 'em-websocket'
  3. Run bundle

  4. Set NANOC_FEATURES to all in the environment, to enable experimental features.

  5. Update your Procfile to say

    watch: bundle exec nanoc compile --watch
    view: bundle exec nanoc view --reload

This will be quite similar to your setup with Guard. Some things will still change before this feature is properly released:

  • Notifications (through macOS’ system notifications or notify-send on Linux)
  • No need to mention extra dependencies in the Gemfile
  • Single live command
  • Lots of testing
  • Windows support

@jm3
Copy link
Author

jm3 commented Nov 20, 2017

Very cool, I'm trying it out now. I followed the instructions (github gem source, new gem deps, re-bundle, export NANOC_FEATURES=all, updated Procfile), but I get this error:

% foreman start
16:26:29 watch.1 | started with pid 14128
16:26:29 view.1  | started with pid 14129
16:26:29 view.1  | view: illegal option -- reload
16:26:29 watch.1 | Compiling site…
16:26:30 view.1  | exited with code 1
16:26:30 system  | sending SIGTERM to all processes
16:26:30 watch.1 | Site compiled in 0.13s.
16:26:30 watch.1 |
16:26:30 watch.1 | exited with code 0

% nanoc -v
Nanoc 4.8.12 © 2007-2017 Denis Defreyne.
Running ruby 2.4.0 (2016-12-24) on x86_64-darwin16 with RubyGems 2.6.8.

my Guardfile looks like this:

guard 'nanoc' do
  watch('nanoc.yaml')
  watch('Rules')
  watch(%r{^(source|layouts|lib)/.*$})
end

guard 'livereload' do
  watch(%r{build/.+\.(css|js|html)})
end

@denisdefreyne
Copy link
Member

Whoops, that’s meant to be --live-reload, not --reload.

You won’t need a Guardfile anymore after this, but please keep it for now, as this feature is still experimental!

@denisdefreyne
Copy link
Member

Also, this commit will make it not look like you’ll get the police after you — “illegal option” is confusing and jargon-y.

@jm3
Copy link
Author

jm3 commented Nov 21, 2017

OK cool, that helped. FYI, if the directory "output" doesn't exist, this error is thrown:

09:20:26 watch.1 | started with pid 60862
09:20:26 view.1  | started with pid 60863
09:20:27 view.1  |
09:20:27 view.1  | Captain! We’ve been hit!
09:20:27 view.1  |
09:20:27 view.1  |   ... 36 lines omitted (see crash.log for details)
09:20:27 view.1  |   9. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen.rb:41:in `new'
09:20:27 view.1  |   8. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/listener.rb:47:in `initialize'
09:20:27 view.1  |   7. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/listener.rb:47:in `new'
09:20:27 view.1  |   6. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/backend.rb:25:in `initialize'
09:20:27 view.1  |   5. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/backend.rb:25:in `new'
09:20:27 view.1  |   4. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/adapter/config.rb:16:in `initialize'
09:20:27 view.1  |   3. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/adapter/config.rb:16:in `map'
09:20:27 view.1  |   2. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/adapter/config.rb:17:in `block in initialize'
09:20:27 view.1  |   1. from ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/adapter/config.rb:17:in `realpath'
09:20:27 view.1  |   ~/vendor/bundle/ruby/2.4.0/gems/listen-3.1.5/lib/listen/adapter/config.rb:17:in `realpath'
09:20:27 view.1  |
09:20:27 view.1  | Errno::ENOENT: No such file or directory @ realpath_rec - ~/jm3.net/output
09:20:27 view.1  |
09:20:27 view.1  | A detailed crash log has been written to ./crash.log.
09:20:27 watch.1 | Compiling site…
09:20:27 view.1  | exited with code 1
09:20:27 system  | sending SIGTERM to all processes
09:20:27 watch.1 | Site compiled in 0.13s.
09:20:27 watch.1 |
09:20:27 watch.1 | exited with code 0
➜ Code/sites/jm3.net (master) ✗ > ack output
crash.log
5:Errno::ENOENT: No such file or directory @ realpath_rec - ~/jm3.net/output

nanoc.yaml
2:enable_output_diff: false
4:output_dir: build

I created output and it fixed it. Nanoc loads and reloads now, but the actual site isn't reloading in the browser when something changes — it requires a manual refresh in Chrome. Is that the expected behavior?

@denisdefreyne
Copy link
Member

Oops, thanks for reporting the No such file or directory error — will fix.

Chrome should automatically reload. Does the console show anything that’s out of the ordinary?

@denisdefreyne
Copy link
Member

Reported as #1254.

nanoc view --live-reload / -L is now released. (The short option changed from -r to -L.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants