让Grails运行起来的第一步是安装发行包。
Grails 下载链接如下:
http://grails.org/Download
请按照如下步骤:
• 下载 Grails的二进制发行包并解压到你指定的目录下
• 新增 GRAILS_HOME 环境变量并指向你解压发行包时选择的目录
• Unix/Linux系统上通常在你的profile文件中添加 export GRAILS_HOME=/path/to/grails 来设置环境变量
• Windows系统上则是在 我的电脑/属性/高级/环境变量 中添加相同的环境变量
• 现在需要添加 bin 目录到 PATH 环境变量中:
• Unix/Linux系统上在profile中继续添加 export PATH=“$PATH: $GRAILS_HOME/bin”
• Windows系统上修改 我的电脑/属性/高级/环境变量 中的 Path 环境变量
如果Grails正常工作了那么你可以在终端窗口中键入 grails 命令并看到如下简单的输出:[code]C:\Documents and Settings\YUCHENGHU>grails
Welcome to Grails 1.1.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: E:\Dkits\grails
No script name specified. Use ‘grails help’ for more info or ‘grails interactive’ to enter interacti
ve mode
C:\Documents and Settings\YUCHENGHU>[/code]