adelevie / parse-ruby-client

A simple Ruby client for the parse.com REST API
MIT License
415 stars 137 forks source link

Running with local parse server #214

Closed ivansifrim closed 7 years ago

ivansifrim commented 7 years ago

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!

rhymes commented 7 years ago

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

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

ivansifrim commented 7 years ago

@rhymes - this worked, thanks!