Mirah 0.0.7 complained about invalid method name "[]" and I relized I
was using 0.0.8 so I went to grab the sources and compile the thing.
First, Bitescript compiled and installed as a gem, good.
The I went to compile mirah and got this:
michal@michal-P5Q-PRO:~/dev/mirah$ rake gem --trace
(in /home/michal/dev/mirah)
rake aborted!
cannot load Java class org.jruby.org.objectweb.asm.MethodHandle
org/jruby/javasupport/JavaUtilities.java:54:in
`get_proxy_or_package_under_package'
/usr/local/lib/jruby/lib/ruby/site_ruby/shared/builtin/javasupport/java.rb:51:in
`method_missing'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/bitescript-0.0.9/lib/bitescript/asm.rb:38:in
`ASM'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/bitescript-0.0.9/lib/bitescript/asm.rb:4:in
`BiteScript'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/bitescript-0.0.9/lib/bitescript/asm.rb:3:in
`(root)'
org/jruby/RubyKernel.java:1038:in `require'
/usr/local/lib/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`require'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/bitescript-0.0.9/lib/bitescript/asm.rb:2:in
`(root)'
org/jruby/RubyKernel.java:1038:in `require'
/usr/local/lib/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in
`require'
/usr/local/lib/jruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in
`require'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/bitescript-0.0.9/lib/bitescript.rb:26:in
`(root)'
org/jruby/RubyKernel.java:1038:in `require'
/home/michal/dev/mirah/lib/mirah.rb:29:in `require'
/home/michal/dev/mirah/Rakefile:22:in `(root)'
org/jruby/RubyKernel.java:1063:in `load'
/home/michal/dev/mirah/Rakefile:2383:in `raw_load_rakefile'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2017:in
`load_rakefile'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2016:in
`load_rakefile'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2000:in `run'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
`standard_exception_handling'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/jruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31:in `(root)'
org/jruby/RubyKernel.java:1063:in `load'
/usr/local/lib/jruby/bin/rake:19:in `(root)'
Is it possible that I should not use openjdk?
Did this happen to you?
Thanks.
--
S pozdravem, Regards
Michal Hantl
tel: +420 777 812 167
gtalk: michal...@gmail.com
skype: michal.hantl
I think this is because latest bitescript requires jruby head to work. I checked out the bitescript commit before headius added invokedynamic support, and that seemed to work.
To build and install from source,
$ git clone http://github.com/headius/bitescript.git
$ git clone http://github.com/mirah/mirah.git
$ cd bitescript
$ gem build bitescript.gemspec
$ gem install bitescript-*
$ cd -
$ cd mirah
$ rake gem
$ gem install pkg/mirah-*
$ cd -
and that didn't work, but this is important:
this is also what the readme says:
== For Java tools:
To build the Mirah jars from source you should have a checkout of both jruby and
bitescript in Mirah's parent directory. Run "ant jar-complete" in jruby, then in
the mirah directory "../jruby/bin/jruby -S rake jar" to build the Mirah jar. Use
"jar:complete" instead to produce a free-standing jar file with JRuby and the
JRubyParser libraries included.
Thanks!
java.lang.ClassFormatError: Illegal method name "[]" in class
controllers/AdminController
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:176)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.mortbay.util.Loader.loadClass(Loader.java:91)
at org.mortbay.util.Loader.loadClass(Loader.java:71)
at org.mortbay.jetty.servlet.Holder.doStart(Holder.java:73)
This goes for every controller I have. It used to compile before i
reinstalled ubuntu.. I'll try to run this with sun java tomorrow.
Do you have a method named []? If so, it needs to be a macro.
-- Sent from my phone
so how do I convert this method to a macro?
def [](param:String); returns String
@request.getParameter(param)
end
So.. thank you! :)