2 Replies Latest reply on Dec 21, 2014 10:29 PM by Kutir Mobility

    Error running extension example

    Jan van Dijk

      I get an error when I run the following code:

       

      > rhodes extension example

      /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:55:in `require': iconv will be deprecated in the future, use String#encode instead.

      Generating with extension generator:

           [ADDED]  extensions/example/ext.yml

           [ADDED]  extensions/example/ext/example.xml

      ...

      ...

           [ADDED]  extensions/example/ext/platform/android/src/com/rho/example/ExampleFactory.java

      Error processing: "/Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/res/generators/templates/extension/extensions/montana/ext/platform/wm/Montana.sln"

      /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/erb.rb:703:in `detect_magic_comment': invalid byte sequence in US-ASCII (ArgumentError)

        from /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/erb.rb:589:in `compile'

        from /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/erb.rb:787:in `initialize'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/actions/template.rb:27:in `new'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/actions/template.rb:27:in `render'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/actions/template.rb:50:in `block in invoke!'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/actions/template.rb:50:in `open'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/actions/template.rb:50:in `invoke!'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/res/generators/rhogen.rb:885:in `block in old_step_through_templates'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/res/generators/rhogen.rb:866:in `each'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/res/generators/rhogen.rb:866:in `old_step_through_templates'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/res/generators/rhogen.rb:905:in `step_through_templates'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/cli/generator.rb:75:in `run'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/cli/manifold.rb:24:in `run'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/templater-1.0.0/lib/templater/manifold.rb:80:in `run_cli'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/bin/rhogen:33:in `<top (required)>'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/bin/rhodes:4:in `load'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/gems/rhodes-4.1.1/bin/rhodes:4:in `<top (required)>'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/bin/rhodes:23:in `load'

        from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p194@gaudi-mobile/bin/rhodes:23:in `<main>'

      > ✗

       

      What is going on? And how can I fix it?

        • Re: Error running extension example
          Jan van Dijk

          I've upgraded to 5.0.2 today... and tried again...

           

          I made a new application (test) which I could run on the tc55.

           

          Then I tried to generate a new extension:

           

            test  rhodes extension anprreader

          /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:121:in `require': iconv will be deprecated in the future, use String#encode instead.

          Generating with extension generator:

              [ADDED]  extensions/anprreader/ext.yml

              [ADDED]  extensions/anprreader/ext/Anprreader.xml

          ...

          ...

              [ADDED]  extensions/anprreader/ext/platform/android/src/com/rho/anprreader/AnprreaderSingleton.java

              [ADDED]  extensions/anprreader/ext/platform/android/src/com/rho/anprreader/AnprreaderFactory.java

          Error processing: "/Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/res/generators/templates/extension/extensions/montana/ext/platform/wm/Montana.sln"

          /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/erb.rb:703:in `detect_magic_comment': invalid byte sequence in US-ASCII (ArgumentError)

            from /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/erb.rb:589:in `compile'

            from /Users/janvandijk/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/erb.rb:787:in `initialize'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/actions/template.rb:27:in `new'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/actions/template.rb:27:in `render'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/actions/template.rb:50:in `block in invoke!'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/actions/template.rb:50:in `open'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/actions/template.rb:50:in `invoke!'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/res/generators/rhogen.rb:1021:in `block in old_step_through_templates'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/res/generators/rhogen.rb:1002:in `each'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/res/generators/rhogen.rb:1002:in `old_step_through_templates'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/res/generators/rhogen.rb:1041:in `step_through_templates'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/cli/generator.rb:75:in `run'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/cli/manifold.rb:24:in `run'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/templater-1.0.0/lib/templater/manifold.rb:80:in `run_cli'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/bin/rhogen:33:in `<top (required)>'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/bin/rhodes:4:in `load'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/gems/rhodes-5.0.2/bin/rhodes:4:in `<top (required)>'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/bin/rhodes:23:in `load'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/bin/rhodes:23:in `<main>'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/bin/ruby_executable_hooks:15:in `eval'

            from /Users/janvandijk/.rvm/gems/ruby-1.9.3-p551@global/bin/ruby_executable_hooks:15:in `<main>'

          ➜  test

           

          :-(