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

Integration with Spring #292

Closed
jcarlson opened this issue Jun 21, 2013 · 4 comments
Closed

Integration with Spring #292

jcarlson opened this issue Jun 21, 2013 · 4 comments

Comments

@jcarlson
Copy link

I use Spring in my Rails project to make things faster, and I just added Rubocop to my project. Unfortunately, when Spring is running, Rubocop won't start and throws this error:

$ rubocop
/usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/lib/rubocop/cli.rb:285:in `initialize': Operation not supported on socket - /Users/jcarlson/Projects/prohub/tmp/spring/spring (Errno::EOPNOTSUPP)
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/lib/rubocop/cli.rb:285:in `open'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/lib/rubocop/cli.rb:285:in `block in ruby_files'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/lib/rubocop/cli.rb:282:in `select'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/lib/rubocop/cli.rb:282:in `ruby_files'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/lib/rubocop/cli.rb:251:in `target_files'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/lib/rubocop/cli.rb:41:in `run'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/bin/rubocop:14:in `block in <top (required)>'
    from /usr/local/var/rbenv/versions/1.9.3-p392/lib/ruby/1.9.1/benchmark.rb:295:in `realtime'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/gems/rubocop-0.8.3/bin/rubocop:13:in `<top (required)>'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/bin/rubocop:23:in `load'
    from /usr/local/var/rbenv/versions/1.9.3-p392/gemsets/prohub/bin/rubocop:23:in `<main>'

I don't know even where to start with this error. Rubocop runs fine if Spring is not running. Any thoughts?

@bbatsov
Copy link
Collaborator

bbatsov commented Jun 21, 2013

You can ignore the tmp folder in your project (via .rubocop.yml) for now.

@jonas054 @yujinakayama I think we should discard socket files in target_files.

@jonas054
Copy link
Collaborator

The problem occurs when we open an extensionless file to check if it has a ruby hashbang line, right? Yes, it seems like a good idea to check if it's an ordinary file before opening it.

@yujinakayama
Copy link
Collaborator

@bbatsov @jonas054 👍

@jcarlson
Copy link
Author

Zero to bug-fix in 10 hours? I can't even get a good cup of coffee or seven in that kind of time... Thanks!

bbatsov pushed a commit that referenced this issue Jul 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants