donv
|
Posted: August 18, 2009 09:45 by donv
|
|
Hi! We had a session on #jruby about getting active_support working with RAWR, but despite the help I got, I am still not able to require 'active_support'. I got a link with a HOWTO: http://kenai.com/projects/monkeybars/pages/UseRubyGemsInYourApplication This is tainted by its use of Monkeybars config files. Could you write a minimal example of how to get ActiveSupport working with just RAWR? ActiveSupport should be precompiled if possible. As a side note: How do I include data directories that contain .java and .rb files in the application JAR without RAWR trying to compile them? RAWR looks great and I appreciate your help! |
Using Active Support
by: Logan Barnett
Logan Barnett
|
Posted: August 18, 2009 23:08 by Logan Barnett
|
|
Donv, Re: Uncompiled data directories Re: HOWTO Here's the Monkeybars resolver.rb: Here's a pretty normal Monkeybars manifest.rb, which is required first-thing in a Monkeybars app: Neither of these should require Monkeybars itself. The manifest might need the require 'monkeybars' and the jar loading removed, but that should be it. Pretty soon, I might be able to work on a runtime library, but it's hard to promise what I can make time for lately. I hope these will prove to be enough. -Logan |
donv
|
Posted: August 21, 2009 16:21 by donv
|
|
Re: Uncompiled data directories
Rawr should only compile files listed under the various source directives. If your configuration has source files in a data directory and they are getting compiled (assuming the data dirs aren't in the source directives), then you have a bug. Please file the bug with your config file too.
So, how do I specify a data directory? |
Logan Barnett
|
Posted: August 24, 2009 17:19 by Logan Barnett
|
|
Here's a directive in the build_configuration.rb:
You may have a version just like this that's commented out. |
jrhicks
|
Posted: October 03, 2009 02:40 by jrhicks
|
|
Where did you eventually store active_resource and active_record? 1) Compiled to class in the main jar? 2) Left as ruby files in the main jar? 3) Left as ruby files but in a separate "data" jar? 4) Outside of jars altogther If you stored migrations, where did you keep them? Thanks. |
Logan Barnett
|
Posted: October 06, 2009 15:01 by Logan Barnett
|
|
They get copied into the main jar. See this declaration in the default Rawr build_configuration.rb: c.source_dirs = ['src', 'lib/ruby'] This treats both src and lib/ruby as Ruby source, and will attempt to compile them if compile_ruby_files is set to true. Due to a bug in JRuby with dashes in compiled Ruby source, you don't want to compile ActiveRecord/Support (it has some baked in gems with gem-version formatted directories). Here's the bug: http://jira.codehaus.org/browse/JRUBY-3247 I stored migrations in the jar as well. However, there are problems with getting to resources in jars with things like Dir[] and Dir.glob. There's lots of bugs filed for this and lots more on the way. While working with JRuby this has fluctuated quite a bit. I don't blame to JRuby team because I've tried fixing it myself and it's usually very painful. The best thing to do for now is see if we can file bugs or comment on existing bugs to 'vote' them up. |
by: Logan Barnett








