Skip to content
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

why undefined method `domain=' for Freshdesk:Class #4

Open
jpwynn opened this issue Aug 25, 2018 · 5 comments
Open

why undefined method `domain=' for Freshdesk:Class #4

jpwynn opened this issue Aug 25, 2018 · 5 comments

Comments

@jpwynn
Copy link

jpwynn commented Aug 25, 2018

installed gem

Using ruby 2.2.7

The FIRST line of the same code provided fails, trying to set the domain?

It's not complaining about the domain (I used the real one), it's complaining there is no such method as domain.

 $ ruby -v
ruby 2.2.7p470 (2017-03-28 revision 58194) [x86_64-darwin16]

$ irb
> require "freshdesk"
 => true 

> Freshdesk.domain = "xyz"
NoMethodError: undefined method `domain=' for Freshdesk:Class
  from (irb):2
  from /Users/buzz/.rvm/rubies/ruby-2.2.7/bin/irb:11:in `<main>'

@carsonholoien
Copy link

Is there any update on this?

@Salomanuel
Copy link

What I did was to ditch this gem and use the rest-client gem
Freshdesk has some very useful examples that ultimately did the trick and greatly helped me achieving what I needed to do (a migration)
https://github.com/freshdesk/fresh-samples/tree/master/Ruby

@iraszl
Copy link

iraszl commented May 24, 2019

What I did was to ditch this gem and use the rest-client gem
Freshdesk has some very useful examples that ultimately did the trick and greatly helped me achieving what I needed to do (a migration)
https://github.com/freshdesk/fresh-samples/tree/master/Ruby

This worked great. Thanks for the tip.

In case somebody is struggling, be aware that the domain variable doesn't need to be the full domain including '.freshdesk.com' just the subdomain part.

@lelizondo23
Copy link

lelizondo23 commented Jan 9, 2020

the problem is adding gem "freshdesk" to your gem file wont install this gem, the gem you're installing is this one : https://github.com/dvliman/freshdesk-api and when you do require "freshdesk" ruby confuses and loads the freshdesk first instead of "freshdesk-ruby".

FIX: you need to delete the freshdesk gem(freshdesk-0.2) from your ruby gems and delete the gem specification (freshdesk-0.2.gemspec)

Once you delete them now you can require "freshdesk" and you will load the correct gem!

@MaicolBen
Copy link

This gem 'freshdesk-ruby', require: 'freshdesk' solved it for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants