0

Application.rb:

require File.expand_path('../boot', __FILE__)

require 'rails/all'
require 'parse-ruby-client'

Parse.init :application_id => "<APP_ID>",
           :api_key        => "<API_KEY>"


# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)

module GarmentsROR
  class Application < Rails::Application

  end
end

My gem parse-ruby-client doesn't seem to allow my rails app to connect to my parse.com account. I have a feeling I've put Parse.init in the wrong place.

The instructions weren't very clear. It assumes I should know where they go.

Would appreciate some help

LondonGuy
  • 10,778
  • 11
  • 79
  • 151

2 Answers2

1

You should create an initializer in config/initializers/parse_ruby_client.rb with:

Parse.init :application_id => "<APP_ID>",
           :api_key        => "<API_KEY>"
  • Done, so then how does the gem know how to communicate with this file? Will it just work? – LondonGuy Aug 01 '14 at 18:23
  • It depends what init method does! If it sets the data, than initializers are the right place to do that, because theese files are loaded only once when server is started! – Māris Cīlītis Aug 01 '14 at 18:26
0

My issue was forgetting to remove the symbols < and > out of the APP ID and API KEY. Doing this solved all my issues.

Timo Tijhof
  • 10,032
  • 6
  • 34
  • 48
LondonGuy
  • 10,778
  • 11
  • 79
  • 151