Changes between Version 5 and Version 6 of QuickStart


Ignore:
Timestamp:
Feb 8, 2011, 9:31:01 AM (7 years ago)
Author:
jannekevdp@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • QuickStart

    v5 v6  
    2020If you run from source from command line, you don't need to set up a database as the default development configuration runs on an in-memory HSQLDB database.
    2121
    22 The following list of commands is known to work under Ubuntu 8.04, provided you have put {{{grails-1.3.4}}} in {{{/app}}} and installed {{{sun-java6-jdk}}}:
     22The following list of commands is known to work under Ubuntu 8.04, provided you have put
     23{{{
     24grails-1.3.4
     25}}}
     26in
     27{{{
     28/app
     29}}}
     30and installed
     31{{{
     32sun-java6-jdk
     33}}}
     34:
    2335{{{
    2436export JAVA_HOME=/usr/lib/jvm/java-6-sun
     
    5365
    5466When you run 'grails run-app' (as NetBeans does behind the scenes), grails automatically installs any plugins on which the application is depending. To view which plugins are in your Grails cache, run:
    55 {{{ls ~/.grails/1.1.1/plugins}}}
     67{{{
     68ls ~/.grails/1.1.1/plugins
     69}}}
    5670 * As of Grails 1.3.1, the plugin structure has changed, and this causes sometimes 'plugin not found' errors even on a fresh Grails download and project checkout. Try running 'grails upgrade', that should solve the problem.
    5771 * It seems that NetBeans sometimes has trouble installing the Nimble plugin, so if it's not there (grails-nimble-0.3-SNAPSHOT.zip), try running 'grails run-app' from the command line in the application directory.
    5872 * Also, if you get complaints about a certain plugin when building from scratch, it could be that some of the plugin versions were are using (see 'application.properties' in the project root) are outdated. Since Grails automatically fetches the newest version of any plugin when installing from scratch, this causes 'artefact not found' errors. You can check for plugin updates with the command 'grails list-plugin-updates'. One way of solving this problem is to upgrade the project plugin version to the newest available version (preferably only latest stable, no RC's), either by updating the version number in 'application.properties' or by using the install-plugin command, e.g. 'grails install-plugin webflow 1.2.2'.
    5973
    60 === Database/Production environment ===
    61 
    62 In production environment, we use a real database as backend, whereas we use an in-memory database in the production environment. (All of this can be changed in grails-app/conf/DataSource.groovy). We tested it with PostgreSQL 8.3, and that works out of the box. The only thing you need to do is to create an empty database; Hibernate will automatically create the database schema in the first run. Also, the application will add test users if there are no users in the database.
     74=== Database/ Production environment ===
     75
     76In production environment, we use a real database as backend, whereas we use an in-memory database in the production environment. (All of this can be changed in grails-app/conf/Datasource.groovy). We tested it with PostgreSQL 8.3, and that works out of the box. The only thing you need to do is to create an empty database; Hibernate will automatically create the database schema in the first run. Also, the application will add test users if there are no users in the database.
    6377
    6478To create the Postgres database (be sure to set authentication to md5 in pg_hba.conf):
     
    103117
    104118You can run both the unit tests and integration tests with the following Grails command:
    105 
    106   grails test-app
     119{{{
     120grails test-app
     121}}}
    107122
    108123=== Webserver production environment ===
     
    110125==== Deploy in a Tomcat container ====
    111126
    112 To generate a production WAR, use {{{grails prod war}}}
     127To generate a production WAR, use
     128{{{
     129grails prod war
     130}}}
    113131
    114132You can deploy this on Tomcat 6.
    115133Known issues:
    116  * If you downloaded Tomcat for Ubuntu, do not forget to set executable file properties to the scripts in /bin: {{{chmod u+x *.sh}}}
    117  * You need to increase the PermGenSpace, otherwise Tomcat will crash. This can be done by setting {{{export CATALINA_OPTS="-Xmx1024M -XX:MaxPermSize=256M"}}}
    118  * You need to upgrade to the latest version of JQuery plugin 1.4.1.1 (see http://jira.codehaus.org/browse/GRAILSPLUGINS-1864), otherwise you will get an error concerning JQueryTagLib: {{{org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.catalina.loader.WebappClassLoader' to required type 'groovy.lang.GroovyClassLoader' for property 'classLoader'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.apache.catalina.loader.WebappClassLoader] to required type [groovy.lang.GroovyClassLoader] for property 'classLoader': no matching editors or conversion strategy found}}}
     134 * If you downloaded Tomcat for Ubuntu, do not forget to set executable file properties to the scripts in /bin:
     135{{{
     136chmod u+x *.sh
     137}}}
     138 * You need to increase the PermGenSpace, otherwise Tomcat will crash. This can be done by setting
     139{{{
     140export CATALINA_OPTS="-Xmx1024M -XX:MaxPermSize=256M"
     141}}}
     142 * You need to upgrade to the latest version of JQuery plugin 1.4.1.1 (see http://jira.codehaus.org/browse/GRAILSPLUGINS-1864), otherwise you will get an error concerning JQueryTagLib:
     143{{{
     144org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.apache.catalina.loader.WebappClassLoader' to required type 'groovy.lang.GroovyClassLoader' for property 'classLoader'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.apache.catalina.loader.WebappClassLoader] to required type [groovy.lang.GroovyClassLoader] for property 'classLoader': no matching editors or conversion strategy found
     145}}}
    119146 * The searchable plugin sometimes causes errors: http://n4.nabble.com/searchable-tomcat6-fail-td1339718.html - temporary fix: delete searchable plugin and searchable and plugin controllers+views
    120  * we use scaffolding, so make sure all scaffolding files (like Controller.groovy) are present in /src/templates/scaffolding when you build the war. You can install them with {{{grails install-templates}}}
     147 * we use scaffolding, so make sure all scaffolding files (like Controller.groovy) are present in /src/templates/scaffolding when you build the war. You can install them with
     148{{{
     149grails install-templates
     150}}}
    121151
    122152==== Set up a virtual host in Apache ====