Google
 

Thursday, July 26, 2007

Issue: JRuby on Rails, Goldspike, NetWeaver

I'm having a couple of issues running a JRuby on Rails application on SAP NetWeaver Application Server.

First of all I wan't to be able to use the DBMS of the NetWeaver App. Server, which in my case is Microsoft SQL Server 2000. But currently there is no working support for SQL Server in activerecord-jdbc 0.4. Hope to find a work-around soon (tried different jdbc drivers, but those are not the issue - actually I know what the issue is, but not how to fix it because when using netbeans 6 you don't seem to get the sources for the gems you are using).

The next issue is that if I use MySQL instead of MS SQL, JRuby can't find the rubygems I use in the WAR file generated by the goldspike plugin (ServletException: Failed to load rubygems).

I just wanted to tell the world about my issues, because I can't seem to find an answer to my trouble anywhere, and the JRuby experts seem to be on (a well-deserved) vacation ;-)

If anyone out there have faced the same issues (or similar), please let me know. Until then I'll continue to try and find a solution (and let you know when I succeed).


technorati tags:, , , , , , , ,

2 comments:

  1. Hi Luposlip,

    As for the gems inside your war, I believe you should customize (or create) a config/war.rb file where you would just write:
    add_gem 'your_gem_name'

    I do that and it works, for me, for instance, in my war.rb, I have:
    add_gem 'jruby-openssl'

    full documentation on this here:
    http://www.headius.com/jrubywiki/index.php/Rails_Integration

    also make sure you have everything requiried in the WEB-INF lib of your jar. The ruby package should be jruby-complete there.

    Hope this will do the trick. As for SQL Server no idea. Just one more reason to run away from closed source.

    Raphaël Valyi.

    ReplyDelete
  2. Very good input! I added the war.rb file to configuration but later I found out that it wasn't necessary to have the add_gem statements in it. But I added the mysql-connector-java jar to it using a call to maven_library which I didn't have before, and that just might have helped a lot.

    I managed to get the setup to work (well, not the SQL Server thing). I can deploy the JRuby on Rails application and it works using MySQL.

    There seemed to be a lot of different things wrong with the rails application I worked with. The missing war.rb being one of them. I think the war file got generated wrongly for some reason, so I ended up moving the code to a completely new rails application. After some other minor work-arounds, the application runs on NetWeaver (the JDK1.4/J2EE1.3 version that is).

    Thanks a lot for commenting Raphaël.

    ReplyDelete

Please comment! I look forward into hearing your comments/oppinions.