JohnDel
JohnDel

Reputation: 2102

Ruby - How to use the hash_syntax gem?

I found this gem https://github.com/michaeledgar/hash_syntax

I don't quite understand how I can use it even though it seems a simple gem. Should I write

 hash_syntax --to-19  

on the shell? Shouldn't I put something on the $PATH so it understands the command?

I also tried to run it through a ruby script (require gem and then run the above command) but it didn't work, it doesn't understand the command.

I've tried it on ubuntu 10.04, rvm and ruby 1.9.3

Upvotes: 0

Views: 177

Answers (2)

HeeL
HeeL

Reputation: 305

You might want to use the other gem that solves the same problem but in slightly other way. Install:

gem install syntax_fix

Run in the project root:

syntax_fix -v

As the result, all the hashes will be converted (including nested files and directories)

Upvotes: 2

robustus
robustus

Reputation: 3706

actually installing the gem via [sudo] gem install hash_syntax should have put it in your PATH.

And yes, the syntax is pretty straightforward: hash_syntax --to-19 FILE.

You could also consult hash_syntax --help

Upvotes: 1

Related Questions