When connecting to an API, the command
TwilioClient.new.send_text(@user, @reminder.message)
fails for motive: ArgumentError (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true)
Firstly, the message is misleading given that there is no particular link involved as the only linking element between the application and the Twilio API is a phone_number, an account_sid and auth_token (although there may be one in the twilio-ruby gem). In addition, the config/environments/development.rb file has its entry
config.action_mailer.default_url_options = { host: 'test.domain.com' }
so either there is a problem in parsing the file (which was not manifest before the introduction of this method invoking above command) or this is referencing some other object with a different name (and thus misleading with the error message)
update
the following line in the method is the culprit
status_callback: update_twilio_reminder_url(@reminder.user_id)
I had to evade the helper function as no syntax was of use & build the URL from its host/controller/action/id components