mirah / dubious

A Web Framework Written in Mirah for running on AppEngine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

appcfg.sh must be on the path

technomancy opened this issue · comments

The dubious gem depends on the appengine-sdk gem, which pulls in most of the Java App Engine SDK. However, the publish task depends on appcfg.sh being on the path, so you must manually download another copy of the Java App Engine SDK to make it work. One good solution would be for the appengine-sdk gem to place appcfg.sh on the path.

we should be apple to call AppCfg.main() instead of running appcfg.sh

That would be better. Do you have time to sketch out what a patch would look like? I'm not all that familiar with App Engine SDK's API around this.

I can make this change if it's just a matter of replacing the shell out. Makes perfect sense.

I think I fixed this, but I can't confirm it because rake gem doesn't work:

Don't know how to build task 'pkg/dubious-0.0.2-java'

Here's a branch with the fix applied if you want to take a look though: https://github.com/technomancy/dubious/tree/appcfg-main

OK... I'm sorta starting to work my way through this, but wow, what a mess this build is! The :upload task in mirah's appengine_tasks.rb is intended to do the same thing as the :publish task, but it's broken since it refers to Java::ComGoogleAppengineTools::AppCfg rather than Java::ComGoogleAppengineToolsAdmin::AppCfg. I'm trying to fix the :upload task and simply make :publish an alias to it, but it's so twisty the way the build is all spread out that it's not working. But at least I think I found the source of the problem.

The rake gem issue is a RubyGems issue http://jira.codehaus.org/browse/JRUBY-5438
RubyGems 1.3.7 changed how the package task works slightly by adding gem_dir to the set of dependencies for packaging, where gem_dir is "pkg/#{gem_name}-#{version}-#{platform}". But, Rake::PackageTask only defines "pkg/#{gem_name}-#{version}", which is why it breaks.