For the past month, all the Radiant-jRuby installation instructions that I have found did not perform as advised. From what I have determined, the root of the issue was Radiant-jRuby was unable to create cache files.  Thus disabling cache allowed Radiant to function properly with jRuby.

To disable caching, comment the config.middle.use argument in environment.rb file.

# config.middleware.use ::Radiant::Cache

If caching is incredibly important, the Rack::Cache module seems to function without any errors, however I haven’t figure out where the cache files are saved.  To enable caching with Rack just update the config.middleware.use argument in environment.rb file.

config.middleware.use ::Rack::Cache

Here below are the instructions I used to enable Radiant on jRuby and Tomcat based on the Radiant CMS instructions at http://kenai.com/projects/jruby/pages/Radiant_CMS

Obtaining Gems

The command below is under the assumption all the required jdbc mysql adapters have been installed. If not please include activerecord-jdbcmysql-adapter gem.

jruby -S gem install –no-ri –no-rdoc radiant radius rack-cache warbler

Create Project and Configuration

Lets create a Radiant mysql application in a directory.

jruby -S radiant –database=mysql radiantblog

Before the application data is created, the database.yml needs to be configured. Simply update the adapter to “jdbcmysql” instead of “mysql”. Here is what the production configuration would look like.

production:
adapter: jdbcmysql
database: radiant
username: username
password: password
host: localhost

With the database.yml configured, the database can now be bootstrapped.

jruby -S rake production db:bootstrap

Lets run the server to test the app and check it at localhost:3000

jruby -S script/server -e production

Deployment

The only deployment that I utilize is with Tomcat using the warbler gem.  Here is the minimum configurations I used starting off with the command to generate the warbler configuration file

jruby -S warble config

warble.rb configuration:

Warbler::Config.new do |config|
config.dirs = %w(cache config db log public script vendor tmp)
config.gems += ["activerecord-jdbcmysql-adapter", "radiant",
"jruby-openssl", "radius", "rack-cache"]
config.gem_dependencies = true
config.war_name = “ROOT”
end

The reason why the config.war_name is ROOT is to avoid any potential Radiant Routing issues. Next build the war file with the following command.

jruby -S warble war

After running the above command, move the newly created file, ROOT.war, to the Tomcat web directory. The URL, localhost:8080, should now render your newly created Radiant blog.

@plightbo

The Setup / TearDown instructions found at http://seleniumhq.org/projects/core/usage.html explains a work around to the issue, however the work around is not the technique I expected.  I am personally most familiar with setup/teardown methods that executes before and after each test case.

Just to throw it out there, a function call that opens a given link page, then executes selenium commands found there, which then after completion would return to the original page would probably be what I would be expecting.  

The workflow behind the Test Suite would probably has a function that I am searching for.  It is similar in that the flow of control starts by opening a test case, executes the commands, then returns to open another test case if available.

Here is a quick crude example in pseudocode of what I am imagining.

File: login_user.html
Login User

  •  open(“/home”);
  • type(“usernameField”, “apple”);
  • type(“passwordField”, “password”);
  • click(“submitButton”, true);
  • assertLocation(“/dashboard”);
     

File: logout_user.html
Logout User

  • click(“Logout”, true);
  • assertLocation(“/home”);
     

File: test_invite_friends.html
Test Invite Friends

  • execute(“login_user.html”);
  • click(“create event”, true);
  • verifyText(“Invite Friends”, true);
  • execute(“logout_user.html”); 
     

Ideally, I would like to declare the Setup/Teardown functions in the Test Suite page instead at the beginning and end of each unit test.  However I noticed that the Test Suite is only single column table;  I am unsure how difficult it would be get Selenium to support multiple columns. 

Here is an example of a test suite file in HTML.

<html>
<head>
<title>My Application Test Suite</title>
</head>
<body>

<table>
<tr><td><b>Suite Of Tests</b></td></tr>
<tr><td>Setup</td><td><a href=“./setup.html”>Test Login</a></td></tr>
<tr><td>Teardown</td><td><a href=“./teardown.html”>Test Login</a></td></tr>
<tr><td><a href=“./TestLogin.html”>Test Login</a></td></tr>

<tr><td><a href=“./TestFormEntry.html”>Test Form Entry</a></td></tr>
<tr><td><a href=“./TestFormSave.html”>Test Form Save</a></td></tr>
</table>

</body>
</html>

Please let me know if I need to provide more details or a better written explaination.
- Thanks

@whereisciao

 

I have recently moved to Waldo from the northland with hopes to save some money, live closer to work, and to soak in the suburb. The area is such a great area. The houses are old but well kept. A good amount of families are out here. It is seriously a great place for a starter family.

The only horrible thing about this living arrangement is the house itself. The basement floods; which have come to realize is normal. I am happy that most of my boxes are raised. I will be going to Home Depot soon to build another platform.

Wires to sense the world

Had to run out to Radio Shack today to find 22-gauge wire for the Arduino board.  Once all the sensors and wires were finally soldered together, it was amazing to turn on the “system”.  I am utterly amazed by all the values being collected by the four sensors.  This is really geeky, but I was able to burn an afternoon.

Yesterday my supplies for Throwies just came in the mail.  Now armed with 100 rare-earth magnets, 100 LEDs and 100 batteries I am so ready to assemble my “For Shitz and Grins” project.  Still do not have secure location to throw and entertain crowds with such mentioned Throwies.

Later on the night, I started assembling/building my multi-touch panel.  The first step thus far has been to polish an acyclic pane of glass.  After sanding for about 30 mins, I assumed the edges were nice and polished, so I proceeded to take about 25 IR LEDs and 25 batteries from the Throwie project to test out the polishing.  Let say the results were less than pleasing.