question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error '-s/--stdin requires exactly one path'

See original GitHub issue

Error stacktrace:

/Users/lucian/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rubocop-0.56.0/lib/rubocop/options.rb:29:inparse’ /Users/lucian/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rubocop-0.56.0/lib/rubocop/cli.rb:37:in run' /Users/lucian/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rubocop-0.56.0/bin/rubocop:13:in block in <top (required)>’ /Users/lucian/.rbenv/versions/2.5.1/lib/ruby/2.5.0/benchmark.rb:308:in realtime' /Users/lucian/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/rubocop-0.56.0/bin/rubocop:12:in <top (required)>’ /Users/lucian/.rbenv/versions/2.5.1/bin/rubocop:23:in load' /Users/lucian/.rbenv/versions/2.5.1/bin/rubocop:23:in <top (required)>’ /Users/lucian/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in load' /Users/lucian/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.1/lib/bundler/cli/exec.rb:75:in kernel_load’ /Users/lucian/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/ge… `

My environment:

  • Rbenv
  • Ruby 2.5.1p57
  • With Visual Studio Code: Version 1.24.0-insider (1.24.0-insider) and also with Visual Studio Code Version 1.23.1
  • rubocop (0.56.0)
  • OS: MacOS High Sierra, v 10.13.4

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:8
  • Comments:6

github_iconTop GitHub Comments

4reactions
jameshibbardcommented, Jan 12, 2019

The problem seems to be caused when you install rubocop using Bundler. Initially, (as per the instructions on the project’s homepage) I had the following in my Gemfile:

gem 'rubocop', '~> 0.62.0', require: false

When I removed this line from the Gemfile and installed rubocop via:

gem install rubocop

The error went away.

3reactions
flipsassercommented, Feb 4, 2021

I was getting the same error @luciuschoi mentioned.

In my case it was happening because I moved a project into an iCloud folder on MacOS. The full path had unescaped, special characters in it. It included a space ( ) and some tildes (~) - the latter I realize is silly to have in a directory name at all, but just FYI. The full command was bundle exec rubocop --stdin /Users/flip/Library/Mobile Documents/com~apple~CloudDocs/Clients/REDACTED/app/models/concerns/user_sync.rb --force-exclusion --auto-correct.

I resolved it simply by moving the project back out of my iCloud drive, but I thought this was worth mentioning.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ruby - rubocop on VScode not working.Error ... - Stack Overflow
So, by default executePath won't be setted, because it's expecting you to have the rubocop executable within your PATH. In a simply way,...
Read more >
Processes — Nextflow 22.10.4 documentation
Files specified with the path qualifier are treated exactly the same as standalone path inputs. Input repeaters ( each ) . The...
Read more >
Process - Robot Framework
stderr, Path of a file where to write standard error. stdin, Configure process standard input. New in RF 4.1.2.
Read more >
setfacl - Set, remove, and change access control lists (ACLs)
If path was not specified, then file and directory names are read from standard input (stdin). In this case, the input should give...
Read more >
CLI Reference — SQLFluff 1.4.5 documentation
PATH is the path to a sql file or directory to lint. ... For example specifying –rules L001 will only search for rule...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found