I am using ST2 on OSX 10.9.1. I have htmlbeautifier
gem installed.I installed BeautifyRuby
using Package Control
.
I have set the ruby
path and file patterns in the Default Settings of BeautifyRuby
as follows :
{
"tab_or_space": "space",
"ruby": "/Users/(username)/.rvm/rubies/ruby-2.1.0/bin/ruby",
"file_patterns": ["\\.html\\.erb", "\\.rb", "\\.rake", "Rakefile", "Gemfile"],
"html_erb_patterns": ["\\.html\\.erb"],
"run_on_save": true,
"save_on_beautify": false
}
For me BeautifyRuby
works for only files with extension .rb
and not for files with extension .erb
.
When i try to beautify a .erb
file i get the following error :
"error: invalid output. check your ruby interpreter settings"
I also tried the same thing with manual installation of BeautifyRuby directly from git. Still gives me the same result.
If using rvm:
1- In your BeautifyRuby.sublime-settings
"ruby": "/Users/(user)/.rvm/rubies/ruby-(version)/bin/ruby"
2- Install htmlbeautifie in global gemset.
rvm use (version)@global gem install htmlbeautifier
This'll fix your problem..
I was facing the same issue and I was able to resolve the issue by installing an older version of htmlbeautifier gem:
gem uninstall htmlbeautifier
gem install htmlbeautifier -v 0.0.12
It seems latest version of htmlbeautifier is not compatible with BeautifyRuby.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With