Anyone know why I would get this error when trying to create a grails app using terminal.
mycomputer:test-apps mailboxe$ grails create-app demo
| Configuring classpath
| Error Error executing script CreateApp: /Users/bla/.grails/ivy-cache/resolved-org.grails.internal-grails-2.0.3.xml (Permission denied) (Use --stacktrace to see the full trace)
As @Phillip Tenn mentions, this is a permissions issue. Chances are something got installed into a cache with the
sudocommand so the root user owns the file and your normal user can’t modify it.The easiest thing to do is probably to just whack your
~/.grailsdirectory, by default, there isn’t anything but cached information in there. So unless you’ve put something in there manually (like a config file), it’s safe to delete and let it regenerate with the nextgrailscommand. To do that, just:It’ll prompt you for your password to ensure you want to run this command as the root user.
Alternatively, you could try to find the offending file and
chownit to your user and group (by default on OSX the group isstaff). So for this example: