-
Notifications
You must be signed in to change notification settings - Fork 13
Uninitialized constant RingCentralSdk::REST
using Rails console
#71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here are some general ways people have resolved the Rails console |
Thank you @grokify, but both of those links do not help this issue. Yes, they talk about the error itself. But they don't provide much substance in the scope of this problem. The issue at hand is the use of the RingCentralSdk module 'REST'. If I were to open an new irb session, I would need to require 'ringcentral_sdk'. Then I could use the gem as intended. ::REST would not throw an uninitialized constant error. Same if I were to create some_file.rb and require 'ringcentral_sdk' within that file. The problem is when added it to a Ruby service (In my case). Where I would test it out by starting the rails console. But when I call Note, I have the RC API configuration and OAuth being handle in the initialize method. |
Can you provide a minimal Rails app with I don't use Rails and while I've installed it and created a controller, it may take a while to get a minimal app running. I generally use Sinatra. If not, I'll still look into this, but it may take longer. |
@grokify You can get a minimal rails app going in less than 30 minutes. There is a beautiful thing with rails scaffolding where you type a few commands and boom. Minimal rails app. I will not be able to create this for you until later today or tomorrow. |
The devil is in the details ;) I have a simple app running, but I don't know how to even instantiate the SDK yet. My first attempt is to load it in a controller where I get the following error:
Here's the controller. The simple variable assignments work, just not instantiating the SDK. require 'ringcentral_sdk'
class WelcomeController < ApplicationController
def index
client = RingCentralSdk::REST::Client.new do |config|
# config here
end
@ringcentral_sdk_version = RingCentralSdk::VERSION
@ringcentral_production_server = RingCentralSdk::RC_SERVER_PRODUCTION
@ringcentral_sandbox_server = RingCentralSdk::RC_SERVER_SANDBOX
end
end |
Ahh, my bad @grokify In this case, I do believe using a ruby service is the way to reproduce my error. I'll send you the code in Glip |
Reported on the RingCentral Developers Glip team:
The text was updated successfully, but these errors were encountered: