I’m a big fan of Ruby, and love using its enumerators and syntax to make my life easier. I’m also starting a new gig where the company is using Grails as a major part of their stack. So, I’m enthusiastic about getting into Groovy and sharing my experience.
- Download it from here. Get the zipped up binary (currently about 27M).
- First reveal it in Finder and copy to /opt. You can open two Finder windows and use command-shift-g to open /opt. Then drag and drop.
- Depending on your permissions, /opt may only be write accessible by root. If so, use
sudo unzipfrom the command line.
- It’s nice to have a directory just named ‘groovy’ instead of ‘groovy-[version]’. Do yourself a favor and make a symlink for switching versions easily later:
sudo ln -s groovy-[version] groovy.
- Fix permissions in the ‘bin’ directory:
chmod a+x *
- Put Groovy environment variables and such in your ‘.bashrc’, ‘.profile’, ‘.zshrc’, or whatever you use:
1 2 3 4
- Source your changes:
- Make sure everything is groovy: