1 Reply Latest reply on Oct 10, 2013 10:26 AM by Jon Tara

    Add tuny_tds gem to mobile app

    Alexey Mironov

      Hi Im try to add tiny_tds gem to my rho mobile application.

      Im install TinyTds gem on my develop PC.

      1. Create in "root_folder/extension" folder;

      2. Copy all from C:\MotorolaRhoMobileSuite2.1.1.7\ruby\lib\ruby\gems\1.9.1\gems\tiny_tds-0.6.1-x86-mingw32\ to root_folder/extension;

      3. Add to build.yml   - tiny_tds :

      sdkversion: "3.5.0"

      name: "cp_Suite"

      version: "1.0"

      vendor: "rhomobile"

      build: "debug"

      bbver: "4.6"

      applog: "rholog.txt"


        configuration: "Release"

        sdk: "iphonesimulator5.0"




        BundleIdentifier: "com.rhomobile.cpsuite"

        BundleURLScheme: "cpsuite"


        productid: "22053921-987a-0130-6da7-546d126c710a"


        uid: "0xec637a6b"


        version: "2.1"


        - json

        - another-extension

        - tiny_tds

      app_type: "rhoelements"



      4. In my mobile app add test string (connection params tested and correct) -

        @client = TinyTds::Client.new(:username => 'sa', :password => '', :database => 'cp_suite', :host => '', :port => '1433')


      5. Run mobile app in win ce MC3190 and have error - "Error load page"


      What i do no correct? I do it as Google Groups

        • Re: Add tuny_tds gem to mobile app
          Jon Tara

          Rhodes does not support loading Gems. Rhodes does not use either your desktop system Ruby installation or any Gems installed there, other than as part of the build process. (Rhodes build uses rake.) Rhodes has a modified ruby 1.9.2 with a modified standard Ruby library built-in to the Rhodes Gem which it uses in your mobile app.


          It's possible to extract the library from a Gem and create a Rhodes extension. The effort can range from trivial (in the case of a small, pure-Ruby Gem) to quite extensive (in the case of a Gem that includes native code.)


          tiny_tds appears to be fairly small, but does have a native extension in C. So, it's not the trivial case, but it is small and self-contained (doesn't depend on other Gems). You should be able to create a native extension by following the Rhodes documentation on creating extensions.

          1 of 1 people found this helpful