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

can not beautify .rb file #1159

Closed
1 task
kevin-jj opened this issue Aug 28, 2016 · 2 comments
Closed
1 task

can not beautify .rb file #1159

kevin-jj opened this issue Aug 28, 2016 · 2 comments
Assignees
Labels

Comments

@kevin-jj
Copy link

kevin-jj commented Aug 28, 2016

Description

can not beautify .rb file using rubocop but manually can do it in command line using rubocop xxx.rb --auto-correct.

Expected Results

To beautify the ruby code.

Steps to Reproduce

  1. Add code to Atom editor
  2. Run command Atom Beautify: Beautify Editor
  3. This beautified code does not look right!

Debug

Here is a link to the debug.md Gist: https://gist.github.com/anonymous/6e2f00f49842f135b20abc3fc86706e4

Checklist

  • [✔️ ] I have tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • [✔️ ] I have reloaded (or restarted) Atom to ensure it is not a caching issue
  • [✔️ ] Searched for existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Generated debugging information and added link for debug.md Gist to this issue
@Glavin001
Copy link
Owner

Looks like an error occurred:

2016-08-28T02:39:11.616Z - debug: [beautifiers/beautifier.coffee] spawn done 1 /Users/liujun/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'rubocop' (>= 0.a) among 19 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/liujun/.rvm/gems/ruby-2.3.1:/Users/liujun/.rvm/gems/ruby-2.3.1@global', execute `gem env` for more information
    from /Users/liujun/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
    from /Users/liujun/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
    from /Users/liujun/.rvm/gems/ruby-2.3.1@mall/bin/rubocop:22:in `<main>'
    from /Users/liujun/.rvm/gems/ruby-2.3.1@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/liujun/.rvm/gems/ruby-2.3.1@global/bin/ruby_executable_hooks:15:in `<main>'

2016-08-28T02:39:11.617Z - verbose: [beautifiers/beautifier.coffee] spawn result 1  /Users/liujun/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:319:in `to_specs': Could not find 'rubocop' (>= 0.a) among 19 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/Users/liujun/.rvm/gems/ruby-2.3.1:/Users/liujun/.rvm/gems/ruby-2.3.1@global', execute `gem env` for more information
    from /Users/liujun/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/dependency.rb:328:in `to_spec'
    from /Users/liujun/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
    from /Users/liujun/.rvm/gems/ruby-2.3.1@mall/bin/rubocop:22:in `<main>'
    from /Users/liujun/.rvm/gems/ruby-2.3.1@global/bin/ruby_executable_hooks:15:in `eval'
    from /Users/liujun/.rvm/gems/ruby-2.3.1@global/bin/ruby_executable_hooks:15:in `<main>'

More specifically: Could not find 'rubocop'
Take a look at #689 and #548

@kevin-jj
Copy link
Author

kevin-jj commented Aug 29, 2016

migrating from RVM to Rbenv fixs this issue.

Your have to get rubocop gem installed in the rvm global path to solve this issue if you are using RVM.

@Glavin001 Glavin001 self-assigned this Jan 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants