librelist archives

« back to archive

Information about Purple Shoes

Information about Purple Shoes

From:
ashbb
Date:
2012-03-11 @ 01:37
Hi all,

I'd like to share a few information about Purple Shoes. :)

1st: Hpricot works.

- jruby --1.9 c:\jruby\bin\gem install hpricot-0.8.6-java.gem
- jruby --1.9 test1.rb

  # test1.rb
  require '../lib/purple_shoes'
  require 'hpricot'
  Shoes.app do
    extend Hpricot
    html = Hpricot do
      xhtml_transitional do
        body do
          h1 'hello'
          h2 'hpricot'
        end
      end
    end.to_html
    para html
  end

2nd: UTF-8 works. (e.g. Japanese characters)

  # encoding: utf-8
  # test2.rb
  require '../lib/purple_shoes'
  Shoes.app do
    para "てすと (te-su-to)"
  end

3rd: Windows binary gem doesn't work. (e.g. chipmunk)

- jruby --1.9 c:\jruby\bin\gem install chipmunk-5.3.4.5-x86-mingw32.gem
- jruby --1.9 test3.rb

  # test3.rb
  require '../lib/purple_shoes'
  Shoes.app do
    require 'chipmunk'
  end

Got an load error:

load error:
c:/jruby/lib/ruby/gems/1.8/gems/chipmunk-5.3.4.5-x86-mingw32/lib/chipmunk
-- java.lang.UnsatisfiedLinkError: failed to load shim library, error


Do you have any information to use chipmunk physics with JRuby?

ashbb