Hi Makoto,
Sorry to hear you were running into trouble. It looks like you're
missing the login step in your testing, we recently added
authentication to
rhosync which was missing instructions on the tutorial. The tutorial
has been updated to include these steps:
http://rhomobile.com/wiki/index.php?title=Mobilizing_Your_Application_with_Rhomobile#Testing_Your_Rhosync_Adapter
Once you've created your user and setup the application w/ a
subscription, you can login to the rhodes app by clicking on the
"login" link on the first page. This will allow the client to
authenticate with the rhosync server and start sending/receiving
records.
Please see my responses to your specific questions below.
Regards,
Lars
On Jan 18, 2009, at 11:01 AM, Makoto wrote:
>
> Hi,
> I just got to know about rhodes/rhosync project and very excited that
> I can code mobile app using Ruby ( I was in the middle of deciding
> whether I should learn Objective C for iphone or Java for Android).
> Thank you for the project.
>
> Anyway, I am now following tutorials in wikis and got some issues, and
> would like to share the problems I had. Hope someone had similar
> problems, and (possibly) solutions.
>
> First, I followed
>
http://rhomobile.com/wiki/index.php?title=Mobilizing_Your_Application_with_Rhomobile#RhoSync_-_the_Web_Service_Sync_Engine
> and I successfully mangaged to sync SugarCRM info. I also tested
> LightHouse sample using my own lighthouse account and that worked,too.
>
> Then, I tried to build the sample Rhodes app on Iphone environment to
> see if I can see the data from iPhoneSimulator(2.2|Debug), but that
> did not work. The below are what I tried.
>
>
> 1. Running sample SugarCRM app (
http://rhomobile.com/wiki/index.php?
> title=Building_Rhodes_on_Supported_Platforms#XCode_Build)
>
> When I built sample project, iphone simulator came up with "Rhodes"
> icon. When I clicked "SugarCRM" => "Accounts" => "Electronics", then I
> got "Error message: undefined method `object' for #".
> Here is the console log.
>
http://pastie.org/363996
There is a known issue with created records that have not been
sync'ed will cause this
problem, and it looks like the record you are trying to edit
hasn't been sync'ed to the server
yet. What the client does when it creates a record is assigns a
temporary object ID (in your case it is
'271967075150364002277') and tries to push that record to the
server. However, since the client
is not logged in, it keeps failing to send the record. I would
recommend you uninstall the app from
the simulator and try again (this will load an empty database to
the simulator so you can login and get
records again).
This is strange, can you post the contents of your accountapp/
application.rb? It should look like this:
require 'rho/rhoapplication'
class AccountappApplication < Rho::RhoApplication
end
>
>
> 3. Trying sample lighthouse app (connecting to
http://rhosync.rhohub.com
> ).
>
> I also tried running lighthouse app. When I clicked "Lighthouse" =>
> "Projects" => "Sync", nothing happened, but seems there are lots of
> activity at background.
> Here is the console log.
>
http://pastie.org/364010
This is also because it doesn't appear you're logged in, so the
client can't receive
the list of lighthouse projects from rhosync.
Looks like the same problem as above, note fetch data message is
complaining (which is probably because of authentication error):
Fetching data from
http://rhosyncdev.rhohub.com/apps/4/sources/9?format=json&client_id=c010056b-5340-4e26-bf83-0f362420fc44
2009-01-18 18:52:53.618 rhorunner[18339:3f07] An error occured
connecting to the sync source: 0 returned