Note: at the moment Herd requires Play 1.2 which does not work on Java 8, so proceed with Java 7. We are going to move it to Play 1.3 as soon as possible to fix that.
- Download Play Framework 1.2.7.2 and install it
- Clone the Herd repository
- Open a shell and go to the
ceylon-herd
directory you just cloned - Run
play dependencies
to setup the required modules-
Note: the
play
script requires Python 2, but runs on/usr/bin/env python
, which may default to Python 3 depending on your system. If you get an error like this:File "/tmp/play-1.2.7.2/play", line 50 print r"~ _ _ " ^ SyntaxError: Missing parentheses in call to 'print'
then change the first line of the script to
#!/usr/bin/env python2
-
Note 2: This will pretend to fail due to not being able to find
db
but in fact they are already there. This is due to Play apparently having removed their Maven repo online. Those two modules have been added to our Git repo so we have them, but this step is still necessary in order to set up thesecure
module which comes from the Play distribution itself. Ignore the two errors and move on: it should work.
-
- Create your Postgres DB
sudo su - postgres
createuser -PSRD ceylon-herd
- enter
ceylon-herd
as password when prompted createdb -O ceylon-herd -E utf8 ceylon-herd
- exit
- Run the application
play run
This can only be done by hand for now:
- Pick a (dummy temporary) password
- Hash it with BCrypt (for example, online at http://bcrypthashgenerator.apphb.com or other locations)
- Copy the resulting BCrypt Hash
- Don't worry about giving your password online, just pick a dummy temporary password and you can change it later in Herd.
- Open a
psql
console to your database:psql -h localhost -U ceylon-herd
- Add your user (as admin)
INSERT INTO user_table (id, email, firstname, admin, lastname, isbcrypt, password, status, username) VALUES ((select nextval('hibernate_sequence')), 'email@example.org', 'FirstName', true, 'LastName', true, 'YOUR_BCRYPT_HASH', 'REGISTERED', 'UserName');
- You can now log in and change your password using the UI
This can only be done by hand for now:
- Register your user at http://localhost:9000/register
- See in the logs in the console what your activation link is, and follow it (in DEV mode no mail is sent)
- Complete your registration
- Open a
psql
console to your database:psql -h localhost -U ceylon-herd
- Set yourself as admin
UPDATE user_table SET admin = true WHERE username = 'your-user-name';
Just run the query-db-version.sh
command to see if and how to update
- If you get the error
FATAL: Ident authentication failed for user "ceylon-herd"
look here for a possible solution
- Create a project using Play by going to the
ceylon-herd
project and running:play eclipsify
- Import the resulting project into Eclipse
This also creates some useful launch configurations in the eclipse
folder that you can use to run the application within Eclipse.
But unfortunately the configurations are not 100% correct, so to make
things work you need to go into the properties of each configuration and
add the following to the VM Arguments
section: -XX:-UseSplitVerifier -Dfile.encoding=utf-8 -XX:CompileCommand=exclude,jregex/Pretokenizer,next
The content of this repository is released under ASL2 as provided in the LICENSE file that accompanied this code.