First they ignore you
then they ridicule you
then they fight you
then you win
    -- Mahatma Gandhi
Chinese => English     英文 => 中文             
随笔-221  评论-1047  文章-0  trackbacks-0

Grails是构建在开源技术如:Spring,HibernateSiteMesh之 上的Web框架。它提供一个类似于Rails的平台可以无缝与Java平台相集成使得开发者能利用当前在Java和JDK方面的投入。Grails提供一 个完整的开发平台包括内置Jetty web服务器并提供了一些强大的功能比如简单的对象关系映射(ORM),自动重新加载应用程序,为CRUD(新增,查询,修改,删除)操作提供代码自动生 成支架(scaffolding)。此外Grails还提供了一些在Java中惯用的语法包括:运用AOP思想的拦截器,动态标签库,JSP和GSP (Groovy Servers Pages)支持。

Grails是Groovy on Rails的缩写,也就是Ruby on Rails(ROR)在java的一种实现,另外一种实现是JRuby on Rails(JROR)。
这里结合我在Ubuntu(在VMware workstation虚拟机上安装的Ubuntu的6.06 LTS Server)上的安装过程做个简要的笔记。
准备工作:
安装Java SDK 1.4或者更高版本,并设置好JAVA_HOME
安装步骤:
下载Grails最新版本,我下载的是Grails 0.3 development snapshot(tar/gz版本竟然连接错误,晕)
选择个目录解压缩Grails(我选择的是/opt/grails)
设置GRAILS_HOME环境变量
把Grails的bin目录添加到环境变量PATH中
命令行下测试下grails,如何看到帮助就说明你安装成功了。
以上步骤相关代码:
#get grails wget http://build.canoo.com/grails/artifacts/grails-bin-0.3-SNAPSHOT.zip #unzip grails and move to the directory you want. unzip grails-bin-0.3-SNAPSHOT.zip mv grails-bin-0.3-SNAPSHOT /opt/grails #let shells has permission to execute chmod 774 /opt/grails/bin/* chmod 744 /opt/grails/ant/bin/* #set environment variable echo export GRAILS_HOME=/opt/grails>>/etc/bash.bashrc echo export PATH=$PATH:$GRAILS_HOME/bin>>/etc/bash.bashrc source /etc/bash.bashrc #test grails


原文地址:http://blog.rubypdf.com/2006/10/18/%e5%ae%89%e8%a3%85grails/

附: Groovy与Grails同甘共苦,苦尽甘来

posted on 2007-04-22 22:00 山风小子 阅读(2080) 评论(1)  编辑  收藏 所属分类: Groovy & Grails