Post by egghead on Apr 15, 2019 5:05:29 GMT
I'm trying to use the nmea_plus gem (https://rubygems.org/downloads/nmea_plus-1.0.23.gem) to capture the geo-coordinates (latitude,longitude,altitude, date, time) by interfacing my app with a GPS dongle over bluetooth. The dongle (specifically NavShare Gagan - accord-soft.com/GNSS_data_logger.html) emits NMEA0183 Rev 4.10 messages over BT continuously once the location is locked to the satellite.
The nmea_plus gem supposedly can parse these NMEA sentences.
However, I've been facing problems in getting this gem work in Rho. Not sure if it can work in a Rhodes app.
What I did :
1. I downloaded the gem, renamed the extension from .gem to .zip, extracted the zip file and copied the contents of all files and sub-folders under lib folder of extracted data.tar.gz (which was inside the gem) to a lib folder under my app by following the documentation at docs.tau-technologies.com/en/6.0/guide/ruby_extensions under "Adding 3rd party gems", i.e., myapp\lib\nmea_plus
2. I then added a
require 'lib/nmea_plus'
in my model's controller file
by following the same documentation under "Adding Libraries to your Rhodes Application"
However, when I try to run the application, I immediately get an error :
Server Error
Error: undefined method `new' for #
Trace:
e:/RhoMobileSuite6.1/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1/lib/framework/rho/rhoapplication.rb:200:in `require'
e:/RhoMobileSuite6.1/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1/lib/framework/rho/rhoapplication.rb:200:in `serve'
e:/RhoMobileSuite6.1/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1/lib/framework/rho/rho.rb:836:in `serve'
In nmea_plus.rb, I see :
require 'lib/nmea_plus/version'
require 'lib/nmea_plus/generated_parser/parser'
require 'lib/nmea_plus/generated_parser/tokenizer'
and these files, viz., version.rb, parser.rb and tokenizer.rb are already there in their respective folders. Only thing is that in parser.rb, I find a reference to another gem (racc) :
require 'lib/racc/parser'
and it does look like nmea_plus gem is dependent on racc
Any suggestions?
The nmea_plus gem supposedly can parse these NMEA sentences.
However, I've been facing problems in getting this gem work in Rho. Not sure if it can work in a Rhodes app.
What I did :
1. I downloaded the gem, renamed the extension from .gem to .zip, extracted the zip file and copied the contents of all files and sub-folders under lib folder of extracted data.tar.gz (which was inside the gem) to a lib folder under my app by following the documentation at docs.tau-technologies.com/en/6.0/guide/ruby_extensions under "Adding 3rd party gems", i.e., myapp\lib\nmea_plus
2. I then added a
require 'lib/nmea_plus'
in my model's controller file
by following the same documentation under "Adding Libraries to your Rhodes Application"
However, when I try to run the application, I immediately get an error :
Server Error
Error: undefined method `new' for #
Trace:
e:/RhoMobileSuite6.1/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1/lib/framework/rho/rhoapplication.rb:200:in `require'
e:/RhoMobileSuite6.1/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1/lib/framework/rho/rhoapplication.rb:200:in `serve'
e:/RhoMobileSuite6.1/ruby/lib/ruby/gems/2.3.0/gems/rhodes-6.1/lib/framework/rho/rho.rb:836:in `serve'
In nmea_plus.rb, I see :
require 'lib/nmea_plus/version'
require 'lib/nmea_plus/generated_parser/parser'
require 'lib/nmea_plus/generated_parser/tokenizer'
and these files, viz., version.rb, parser.rb and tokenizer.rb are already there in their respective folders. Only thing is that in parser.rb, I find a reference to another gem (racc) :
require 'lib/racc/parser'
and it does look like nmea_plus gem is dependent on racc
Any suggestions?