Monday, June 16, 2008
Ruby Conference in Northern Virginia
RubyNation is an annual Ruby conference serving the Virginia, West Virginia, Maryland, and Washington, DC areas. This year's RubyNation will happen on August 1 & 2, 2008 in Herndon, VA. Please visit the RubyNation site for more details.
Friday, September 21, 2007
Railing on JBoss
I recently successfully deployed a Ruby on Rails app running on jruby that uses ActiveRecord-JDBC adapter to talk to Oracle 10g database to run on JBoss 4.2.1. I used warbler plugin from Nick Seiger to convert the rails app to war file. I basically followed the instructions at this article about warbler (http://blog.nicksieger.com
There were a few quirks during this process which are listed below and hopefully these will be helpful to those trying to do the same. Theoretically this should work on any J2EE compliant app server or even Servlet containers.
- I had to uncomment the following line in warble.rb (warbler config file)
and change it to
config.gems = ["rails", "ActiveRecord-JDBC"]
This packages rails and ActiveRecord-JDBC gems in the war file.
- To use ActiveRecord-JDBC adapter you need to add the following code to environment.rb file
if RUBY_PLATFORM =~ /java/
require 'rubygems'
gem 'ActiveRecord-JDBC
require 'jdbc_adapter'
end
You need to be careful about where in that file you add these lines. They must be added before the line
Rails::Initializer.run do |config|
- This one should be obvious but you need to add the jdbc driver jar to JBoss lib folder. Since I used the default configuration in Jboss I added it to C:\opt\jboss-4.2.1.GA\server\default\lib folder.
Thursday, June 21, 2007
Accessing MySql from remote machine in my network
from
bind-address = 127.0.0.1
to
bind-address = 0.0.0.0
The IP of 0.0.0.0 allows incoming connection from any host and of course you need to make sure there is not firewall in between blocking the port 3306. Since all this setup sits behind my Linux firewall it is pretty secure and allows me to develop my ROR apps from the windows box by accessing MySQL databases on another machine.