At Accolade, we’ve been playing around with the Ruxit platform. But one of the first issues you may hit is how to make it identify your Play application correctly. There’s this treatise on how to use an environment variable, but what does it MEAN? Thankfully, I am here to help.
You simply have to set your RUXIT_CLUSTER_ID before running your application. The easiest way to do this is right on the command line!
We’ve been using the Play framework lately at KonciergeMD to build our application. One thing that’s always good to have on your application is good test coverage, and there’s no shortage of tools to measure that.
To get the reports on code coverage, we decided to give JaCoCo a shot, and specifically try to use the sbt-jacoco plugin to do it.
Trying to use it right out of the box, however, proved useless. Running jacoco:cover from sbt or play would not work, and instead run no tests while not giving any error messages, and making you feel like a fool for trying.
After staring at the problem for a while, @seantbrady and I finally came across the solution. The main and simple issue with it is that sbt runs tests in parallel by default, and this is what the sbt-jacoco plugin inherits. You can see this by doing the following in the play console:
Play, however, has this set to false. The simple solution, then, is to set this to false for jacoco also.
How to make it work
UPDATE: We originally had the settings in a separate build.sbt file in the root directory to make this work. A quick email from Peter Hausel at Typesafe showed us how we can do it in the Build.scala file present in the project directory.
Some of this is covered in the sbt-jacoco wiki, but I’m going to put it all here for completeness.
Add the following to the plugins.sbt
We also added the following to the Build.scala file in the project directory
I’ll highlight some of the more important parts of this file.
First is this line:
This adds the jacoco settings to the variable s.
Next is this line:
You’ll notice settings = s is added to the PlayProject. This adds the default and jacoco settings to the PlayProject.
Finally this line:
Will make sure that parallelExecution is off during test execution.
Now you can run jacoco:cover to produce your beautiful coverage report! You can see your report at target/scala-2.9.1/jacoco/html.
where server is the name of your campfire server (in the form of name.campfirenow.com) and apitoken is the token given to you. You can get this token by going under the “My Info” link on your campfire page.
The script will print out a list of rooms, and give you a choice of which one to delete from (or all). You can ignore the “peer certificate” warning, it just means that you’re not verifying the cert from campfirenow. We’ll assume the server is correct.
Here’s what a sample run will look like:
Again, since this is my first ever Ruby program, it’s probably in pretty crappy shape. Deriding comments about the exact level of crappiness are always welcome.
I finally got around to releasing my silly little app for Android. It’s called “Sleepwords”, and it floats the name of random objects in front of you, to help you sleep, meditate, or give your conscience mind a distraction to help your subconscious mind flow free. Best of all, IT’S FREE. So you really have no excuse not to at least try it.
When I was trying to get Google Music working on my Ubuntu install, I was getting the following error:
On my motherboard, I have two ethernet ports. Doing an ifconfig, I saw something weird with my MAC addresses.
I’m only using eth1, but you can see that both of the ethernet ports are reporting the same MAC address of aa:00:04:00:0a:04. I found this post detailing that the DECNet tools is what causes the MAC address to be the same. To remove them, run the following:
Reboot, and running ifconfig will show your ethernet ports mapped to their correct MAC address. Now you should not have any problems running Google Music!