adelevie / parse-ruby-client

A simple Ruby client for the parse.com REST API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Running with local parse server

ivansifrim opened this issue · comments

Hello,

I'm trying to run a script with this gem to operate on my local parse server (http://localhost:1337/parse)

I'm using the master branch because I didn't see a way to include a server url in the previous version.

Parse.create :application_id => "xxx",
:master_key => "xxx",
:host => 'http://localhost:1337',
:path => '/parse'

Then I try:

me = Parse::User.authenticate("username", "password")

but it breaks with the error: uninitialized class variable @@client in Parse

Any help would be appreciated. Thank you!

@ivansifrim you have to pass along the client you just created:

client = Parse.create ...
me = Parse::User.authenticate("username", "password", client)

@rhymes - this worked, thanks!