Comments (6)
@daviscale We haven't made it to our upgrade cycle just yet (had other issues bump this down in priority). I know that my colleague is working in ruby 3.0.1
and doesn't have this issue.
from action-rubocop.
I think this problem is in Ruby 2.5. Please use v2.6 or higher:
$ ruby25 -r pathname -e 'p Pathname.new("/usr/bin/cc").relative_path_from("/usr/bin")'
Traceback (most recent call last):
1: from -e:1:in `<main>'
/usr/local/lib/ruby/2.5/pathname.rb:508:in `relative_path_from': undefined method `cleanpath' for "/usr/bin":String (NoMethodError)
$ ruby26 -r pathname -e 'p Pathname.new("/usr/bin/cc").relative_path_from("/usr/bin")'
#<Pathname:cc>
from action-rubocop.
@mgrachev Thanks for the update! I didn't know that was an issue. We do have it on our list to get our app updated to at least ruby 2.7
(shooting for 3.1
) this year.
from action-rubocop.
@thestelz were you able to confirm that upgrading to ruby 2.7
fixed this issue?
from action-rubocop.
@daviscale I was able to update my application to ruby 2.7.5
(rails 5.2.8
) and that fixed the cleanpath
issue, but now I'm getting the following error:
ERROR: Error installing rubocop:
The last version of rubocop-ast (< 2.0, >= 1.17.0) to support your Ruby & RubyGems was 1.17.0. Try installing it with `gem install rubocop-ast -v 1.17.0` and then running the current command again
rubocop-ast requires Ruby version >= 2.6.0. The current ruby version is 2.5.0.
My gemfile for rubocop:
gem 'rubocop', '~> 1.29.1', require: false
Gemfile.lock
:
rubocop (1.29.1)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.17.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
Is this an issue with rubocop itself or is there something else going on that I can't think of?
from action-rubocop.
@daviscale Nvm. I'm dumb and forgot to update the reviewdog.yml
file to use ruby 2.7.5
-ruby-version: 2.5.3
+ruby-version: 2.7.5
Everything is now working as expected. Thank you for your help!
from action-rubocop.
Related Issues (20)
- Can't seem to be able to run the correct rubocop version HOT 1
- Add ability to skip install of rubocop and extensions HOT 1
- How i can use my own robocop rule? HOT 1
- Set default token to `github_token` input parameter HOT 5
- Undefined method `begin' for PseudoSourceRange HOT 6
- Fail running rubocop step if rubocop command itself fails HOT 5
- gem install was failed with Ruby 2.6.6 HOT 2
- Takes too long HOT 5
- getting REVIEWDOG_GITHUB_API_TOKEN error HOT 2
- [BUG] Invalid request. Only 65535 characters are allowed; 70292 were supplied. HOT 6
- undefined method `begin' for nil:NilClass HOT 2
- Possible to suggest linting corrections? HOT 5
- GitHub marketplace shows v1 as the latest HOT 2
- Rubocop info severity causes build failure
- reviewdog fails to parse when `--server` option is given HOT 1
- `Style/MethodDefParentheses` creates a suggestion with just one opening parenthese
- Cache ruby gems to speed up installation HOT 2
- Replace actions/create-release HOT 1
- rubocop_extensions installation version from Gemfile does not work with wrong definition order of gems HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-rubocop.