- 
                Notifications
    You must be signed in to change notification settings 
- Fork 0
Onboarding New Developer
Add a new developer or designer to the system, add user to GitHub repo as a collaborator.
Create new email account on the Google domain. Set it to forward to the user's personal GMail account. Make sure to come back after the user confirms to actually set it to forward and delete email coming to the Apps account.
Log into GMail, go to settings, go to Accounts and Import, add another email address you own, add the new address, unselect "treat as an alias", use SMTP: smtp.gmail.com, username: [username]@wearecurio.us, password whatever password the admin chose for the account. Then send a verification email and click on it when you receive it.
Launch the Terminal app from !Applications/Utilities. Then enter these commands:
cd ~ mkdir .ssh chmod 700 .ssh ssh-keygen -b 2048 -t rsa -f .ssh/id_rsa [choose a strong passphrase which you can remember --- DO NOT GENERATE A KEY WITHOUT A PASSPHRASE] cat .ssh/id_rsa.pub
Take the output of the "cat" command, above, and email it to an admin so they can add it to your new GitHub account, or add it yourself to the account and email the admin to add your GitHub account as a user to the project repo.
Download Groovy/Grails Tool Suite based on Eclipse 4.4.2:
https://spring.io/tools/ggts/all
You will need to up the memory settings to avoid out of memory errors and slow performance due to GC pauses.
On Mac OS X, control-click on the icon for the GGTS app in your dock and choose Options->Show In Finder. Control-click on the GGTS app, and select "Show Package Contents". In Contents->MacOS open GGTS.ini and open with a text editor (recommend TextWrangler). Change the following lines to up the memory limits:
-Xmx1500m
On Linux, find GGTS.ini and make the same edits.
When you launch GGTS, set the workspace to your home directory/grails2workspace, and check the "use this as the default" checkbox.
Download Grails 2.5.0:
Unzip Grails into /grails and set the Grails version in Eclipse's Preferences->Groovy->Grails.
If your private key isn't already in your Eclipse configuration, you must add your private key to the Eclipse SSH2 configuration by going to Preferences->General->Network Connections->SSH2. If your private key uses the default id_rsa key name, you don't need to add this.
Add user to github:
Create GitHub account for user, if they don't have one already. Add public key to their account. If they have an account already, add this to the curious2 repo as a user.
IMPORTANT NOTE: Do not install JDK 8 yet. It causes instability in Eclipse Grails builds.
Make sure your /etc/profile shows:
export JAVA_HOME="`/usr/libexec/java_home -v '1.7*'`"
(You have to edit this as root).
Download and install the latest command-line git:
http://code.google.com/p/git-osx-installer/
Configure the Git installation in Eclipse's Preferences->Team->Git->Configuration->System Settings, choose Browse then select as /usr/local/git
Open the Grails perspective, and choose Window->Show View->Other->Problems and add to your perspective. This is a useful perspective to find any syntax errors in your Grails app.
Also recommend consolidating the various panels to save screen space.
Update Eclipse to add beta version of Groovy 2.4 compiler:
Go to Help->Install New Software.
Use this update site: http://dist.springsource.org/snapshot/GRECLIPSE/e4.4/
Add Extra Groovy Compilers->Groovy Compiler 2.4 Feature.
Relaunch STS-Eclipse.
Go to the main GGTS Preferences menu.
Select Groovy Compiler and change to version 2.4.
Clone the Curious repository in your Eclipse/STS configuration:
Go to File->Import, Git->Projects from Git, Next, Clone URI, Next.
Use the following repository URI: [email protected]:syntheticzero/curious2.git
Don't set any other parameters. Hit Next.
Choose all the branches. Next.
Change the directory to [your workspace directory]/curious2. (Do not use /git/curious2). Keep initial branch as "master", remote name: "origin".
Choose the curious2 project to import. (Choose the default import options when asked).
Wait a long time for it to clone (it will seem to get stuck, but it will eventually finish).
After it appears in the project explorer, wait for a long time for it to finish updating (see status update in lower right corner of Eclipse window).
After it is done updating, right-click on the project in the Project Explorer->Properties, select Groovy Compiler, change to version 2.4.
If you see a lot of errors in the Problems pane, right click on the project again, select Grails Tools->Refresh Dependencies. Then right click on the project->Properties and reset the Groovy Compiler to version 2.4 again.
Run Project->Clean. Wait for it to finish building.
Click on Grails control in the icon bar or right-click on project in the Project Explorer->Grails Tools->Open Grails Command Prompt, enter "clean" and hit OK. Then do it again, enter "compile" and hit OK.
You may want to turn off Project->Build Automatically because it can slow down editing. This enables the Build All and Build Project options. Note: launching the app or a test suite will automatically trigger a build as well.
Tip: If you've been editing for a while and there are errors in the Problems pane that seem spurious, try Project->Clean which will also do a build. You can also run a manual Grails clean/Grails compile as a last resort, then Project->Clean.
Install MySQL community server and MySQL Workbench from:
http://dev.mysql.com/downloads/
Also install MysqlStartupItem.pkg when you install MySQL community server and reboot your machine.
Once installed, run MySQL Workbench, add a localhost connection and add a localhost server instance to server management (remember to change the type from Windows to OS X). In server management, create a user named "curious", use the password in !DataSource.groovy, and create three databases named "tlb", "tlb_dev", and "tlb_test", and grant all privileges on these databases to the user "tlb".
You may need to manually flush privileges, restart mysql, or set the max connections, etc., to some other number like 100 and then set it back to 0 to make it work. We don't know exactly why.
Under Run->Debug Configurations, in the Grails section, add three new debug configurations --- in the Grails Command section, make one with each of the following commands:
run-app (title this "grails run-app") test-app --stacktrace --integration --verbose (title this "grails test-app") test-app --stacktrace --verbose Entry (title this "grails test-app class")
The last one is intended to run just one class worth of tests, you can edit the Debug Configurations before running it and change Entry to whatever you're testing.
NOTE: If you're running the same test over and over again, it will save you a lot of time to run it on the command line in interactive mode. cd to your Eclipse workspace folder, and then into the curious2 folder (or whatever you've called it), and run "grails". You will then be in interactive mode. You can type "test-app --stacktrace --verbose <class name>" and hit return. The first time it will take a while to start up, but on subsequent runs it will load much faster.
Configure Postfix to run on port 25 of your local machine. If OS X, you can follow the instructions here:
http://benjaminrojas.net/configuring-postfix-to-send-mail-from-mac-os-x-mountain-lion/
To test the application, click on the Grails icon (fourth icon from the left in the top icon bar), type run-app as the command name, and hit OK. If it doesn't run due to a Grape error, try configuring Grails Grape by pasting the following into ~/.groovy/grapeConfig.xml:
<ivysettings>
  <settings defaultResolver="downloadGrapes"/>
  <resolvers>
    <chain name="downloadGrapes">
      <filesystem name="cachedGrapes">
        <ivy pattern="${user.home}/.groovy/grapes/[organisation]/[module]/ivy-[revision].xml"/>
        <artifact pattern="${user.home}/.groovy/grapes/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
      </filesystem>
      <!-- todo add 'endorsed groovy extensions' resolver here -->
      <ibiblio name="codehaus" root="http://repository.codehaus.org/" m2compatible="true"/>
      <ibiblio name="ibiblio" m2compatible="true"/>
      <ibiblio name="java.net2" root="http://download.java.net/maven/2/" m2compatible="true"/>
    </chain>
  </resolvers>
</ivysettings>You can then look at the app by selecting
https://localhost:8080/home/index <- main web interface
https://localhost:8080/mobile/index <- mobile interface
The next time you run Grails you can click on the down arrow next to the Grails icon and select run-app.