SMS messages not being sent using Twilio and RailsHow can I rename a database column in a Ruby on Rails migration?link_to :action => 'create' going to index rather than 'create'ruby on rails has_many relation form validation of childrenHow to use concerns in Rails 4How to write a rspec for update action for controller?Rails 4 scaffold generator Testing controller action update failsRoR - Call a new Action without a View on a formaction mailer for rails 4Getting “First argument in form cannot contain nil or be empty” errorRails Dot in Url with two routes for one controller

What is the fastest integer factorization to break RSA?

Why were 5.25" floppy drives cheaper than 8"?

What Exploit Are These User Agents Trying to Use?

How to prevent "they're falling in love" trope

Why was the shrink from 8″ made only to 5.25″ and not smaller (4″ or less)

Finitely generated matrix groups whose eigenvalues are all algebraic

how do we prove that a sum of two periods is still a period?

How can a day be of 24 hours?

GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?

Convert seconds to minutes

What does the same-ish mean?

In Bayesian inference, why are some terms dropped from the posterior predictive?

Avoiding the "not like other girls" trope?

Why is the sentence "Das ist eine Nase" correct?

Where would I need my direct neural interface to be implanted?

How to install cross-compiler on Ubuntu 18.04?

How can saying a song's name be a copyright violation?

Could the museum Saturn V's be refitted for one more flight?

How obscure is the use of 令 in 令和?

Did 'Cinema Songs' exist during Hiranyakshipu's time?

What is the opposite of "eschatology"?

Is it a bad idea to plug the other end of ESD strap to wall ground?

What is a Samsaran Word™?

How badly should I try to prevent a user from XSSing themselves?



SMS messages not being sent using Twilio and Rails


How can I rename a database column in a Ruby on Rails migration?link_to :action => 'create' going to index rather than 'create'ruby on rails has_many relation form validation of childrenHow to use concerns in Rails 4How to write a rspec for update action for controller?Rails 4 scaffold generator Testing controller action update failsRoR - Call a new Action without a View on a formaction mailer for rails 4Getting “First argument in form cannot contain nil or be empty” errorRails Dot in Url with two routes for one controller













0















I am trying to integrate Twilio and my rails application to send different text messages based on what option is chosen and saved to the database in the form. However after studying the docs and viewing the example applications they provide (Send ETA Notifications), saving the completed form, no text message is sent and I cannot figure out why. I would love some suggestions



job_status are the options to choose from which the text message body needs to change with:



 JOB_STATUSES = ["Wildey Que", "In Service-Bay", "Awaiting Approval", 
"Awaiting Parts", "Jackson Collection Que", "Wildey Collection Que",
"Completed"]


message_sender.rb



class MessageSender

require 'twilio-ruby'

def self.send_message(job_id, host, to, message)
new.send_message(job_id, host, to, message)
end

def initialize
# To find TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN visit
# https://www.twilio.com/console
account_sid = ENV['---'] (These are entered)
auth_token = ENV['---']
@client = Twilio::REST::Client.new(account_sid, auth_token)
end


def send_message(job_id, host, to, message)
@client.messages.create(
from: twilio_number,
to: to,
body: message,
status_callback: "http://#host/jobs/#job_id"
)
end

private

def twilio_number
# A Twilio number you control - choose one from:
# https://www.twilio.com/console/phone-numbers/incoming
# Specify in E.164 format, e.g. "+16519998877"
ENV['+17652957305']
end
end


jobs_controller.rb



 class JobsController < ApplicationController
before_action :set_job, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!



# GET /jobs
# GET /jobs.json
def index
if(params.has_key? (:job_status))
@jobs = Job.where(job_status: params[:job_status]).order("created_at desc")
else
@jobs = Job.all.order("created_at desc")
end
end

# GET /jobs/1
# GET /jobs/1.json
def show
end

# GET /jobs/new
def new
@job = current_user.jobs.build
end

# GET /jobs/1/edit
def edit
end

#TWILLIO INITILIZATION

def send_initial_notification
@job.job_status = :Wildey_Que
if @job.save
message = 'Equip4you: Thanks for dropping your machine off, we will keep you updated here every step of the way'
notify(message)
else
redirect_with_error
end
end

def send_delivery_notification
@job.job_status = :Completed
if @job.save
message = 'Equip4you: Thank you for allowing us to take care of your machine for you, if you have any further questions or concerns feel free to contact 425-9999'
notify(message)
else
redirect_with_error
end
end

#END TWILLIO INIT

# POST /jobs
# POST /jobs.json
def create
@job = current_user.jobs.build(job_params)

respond_to do |format|
if @job.save
format.html redirect_to @job, notice: 'Job was successfully created.'
format.json render :show, status: :created, location: @job
else
format.html render :new
format.json render json: @job.errors, status: :unprocessable_entity
end
end
end

# PATCH/PUT /jobs/1
# PATCH/PUT /jobs/1.json
def update
respond_to do |format|
if @job.update(job_params)
format.html redirect_to @job, notice: 'Job was successfully updated.'
format.json render :show, status: :ok, location: @job
else
format.html render :edit
format.json render json: @job.errors, status: :unprocessable_entity
end
end
end

# DELETE /jobs/1
# DELETE /jobs/1.json
def destroy
@job.destroy
respond_to do |format|
format.html redirect_to jobs_url, notice: 'Job was successfully destroyed.'
format.json head :no_content
end
end

private

# TWILLIO INNIT

def notify(message)
MessageSender.send_message(
@job.id, request.host, @job.cell_number, message)
redirect_to jobs_url, notice: 'Message was delivered'
end

def redirect_with_error
message = "An error has occurred updating the ticket status"
redirect_to orders_url, flash: error: message
end

#TWILLIO INIT END


# Use callbacks to share common setup or constraints between actions.
def set_job
@job = Job.find(params[:id])
end

# Never trust parameters from the scary internet, only allow the white list through.
def job_params
params.require(:job).permit(:job_status, :purchase_name, :contact_name, :cell_number, :home_number, :other_number, :other_number, :address, :machine_mod, :item_number, :serial_number, :concern, :accessories, :pickup_location, :paid, :invoice_number, :outcome, :avatar)
end
end

Routes.rb

require 'sidekiq/web'

Rails.application.routes.draw do
resources :jobs
devise_for :users
root to: 'jobs#index'


post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'


routes.rb



require 'sidekiq/web'

Rails.application.routes.draw do
resources :jobs
devise_for :users
root to: 'jobs#index'


post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'









share|improve this question


























    0















    I am trying to integrate Twilio and my rails application to send different text messages based on what option is chosen and saved to the database in the form. However after studying the docs and viewing the example applications they provide (Send ETA Notifications), saving the completed form, no text message is sent and I cannot figure out why. I would love some suggestions



    job_status are the options to choose from which the text message body needs to change with:



     JOB_STATUSES = ["Wildey Que", "In Service-Bay", "Awaiting Approval", 
    "Awaiting Parts", "Jackson Collection Que", "Wildey Collection Que",
    "Completed"]


    message_sender.rb



    class MessageSender

    require 'twilio-ruby'

    def self.send_message(job_id, host, to, message)
    new.send_message(job_id, host, to, message)
    end

    def initialize
    # To find TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN visit
    # https://www.twilio.com/console
    account_sid = ENV['---'] (These are entered)
    auth_token = ENV['---']
    @client = Twilio::REST::Client.new(account_sid, auth_token)
    end


    def send_message(job_id, host, to, message)
    @client.messages.create(
    from: twilio_number,
    to: to,
    body: message,
    status_callback: "http://#host/jobs/#job_id"
    )
    end

    private

    def twilio_number
    # A Twilio number you control - choose one from:
    # https://www.twilio.com/console/phone-numbers/incoming
    # Specify in E.164 format, e.g. "+16519998877"
    ENV['+17652957305']
    end
    end


    jobs_controller.rb



     class JobsController < ApplicationController
    before_action :set_job, only: [:show, :edit, :update, :destroy]
    before_action :authenticate_user!



    # GET /jobs
    # GET /jobs.json
    def index
    if(params.has_key? (:job_status))
    @jobs = Job.where(job_status: params[:job_status]).order("created_at desc")
    else
    @jobs = Job.all.order("created_at desc")
    end
    end

    # GET /jobs/1
    # GET /jobs/1.json
    def show
    end

    # GET /jobs/new
    def new
    @job = current_user.jobs.build
    end

    # GET /jobs/1/edit
    def edit
    end

    #TWILLIO INITILIZATION

    def send_initial_notification
    @job.job_status = :Wildey_Que
    if @job.save
    message = 'Equip4you: Thanks for dropping your machine off, we will keep you updated here every step of the way'
    notify(message)
    else
    redirect_with_error
    end
    end

    def send_delivery_notification
    @job.job_status = :Completed
    if @job.save
    message = 'Equip4you: Thank you for allowing us to take care of your machine for you, if you have any further questions or concerns feel free to contact 425-9999'
    notify(message)
    else
    redirect_with_error
    end
    end

    #END TWILLIO INIT

    # POST /jobs
    # POST /jobs.json
    def create
    @job = current_user.jobs.build(job_params)

    respond_to do |format|
    if @job.save
    format.html redirect_to @job, notice: 'Job was successfully created.'
    format.json render :show, status: :created, location: @job
    else
    format.html render :new
    format.json render json: @job.errors, status: :unprocessable_entity
    end
    end
    end

    # PATCH/PUT /jobs/1
    # PATCH/PUT /jobs/1.json
    def update
    respond_to do |format|
    if @job.update(job_params)
    format.html redirect_to @job, notice: 'Job was successfully updated.'
    format.json render :show, status: :ok, location: @job
    else
    format.html render :edit
    format.json render json: @job.errors, status: :unprocessable_entity
    end
    end
    end

    # DELETE /jobs/1
    # DELETE /jobs/1.json
    def destroy
    @job.destroy
    respond_to do |format|
    format.html redirect_to jobs_url, notice: 'Job was successfully destroyed.'
    format.json head :no_content
    end
    end

    private

    # TWILLIO INNIT

    def notify(message)
    MessageSender.send_message(
    @job.id, request.host, @job.cell_number, message)
    redirect_to jobs_url, notice: 'Message was delivered'
    end

    def redirect_with_error
    message = "An error has occurred updating the ticket status"
    redirect_to orders_url, flash: error: message
    end

    #TWILLIO INIT END


    # Use callbacks to share common setup or constraints between actions.
    def set_job
    @job = Job.find(params[:id])
    end

    # Never trust parameters from the scary internet, only allow the white list through.
    def job_params
    params.require(:job).permit(:job_status, :purchase_name, :contact_name, :cell_number, :home_number, :other_number, :other_number, :address, :machine_mod, :item_number, :serial_number, :concern, :accessories, :pickup_location, :paid, :invoice_number, :outcome, :avatar)
    end
    end

    Routes.rb

    require 'sidekiq/web'

    Rails.application.routes.draw do
    resources :jobs
    devise_for :users
    root to: 'jobs#index'


    post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
    post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'


    routes.rb



    require 'sidekiq/web'

    Rails.application.routes.draw do
    resources :jobs
    devise_for :users
    root to: 'jobs#index'


    post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
    post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'









    share|improve this question
























      0












      0








      0








      I am trying to integrate Twilio and my rails application to send different text messages based on what option is chosen and saved to the database in the form. However after studying the docs and viewing the example applications they provide (Send ETA Notifications), saving the completed form, no text message is sent and I cannot figure out why. I would love some suggestions



      job_status are the options to choose from which the text message body needs to change with:



       JOB_STATUSES = ["Wildey Que", "In Service-Bay", "Awaiting Approval", 
      "Awaiting Parts", "Jackson Collection Que", "Wildey Collection Que",
      "Completed"]


      message_sender.rb



      class MessageSender

      require 'twilio-ruby'

      def self.send_message(job_id, host, to, message)
      new.send_message(job_id, host, to, message)
      end

      def initialize
      # To find TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN visit
      # https://www.twilio.com/console
      account_sid = ENV['---'] (These are entered)
      auth_token = ENV['---']
      @client = Twilio::REST::Client.new(account_sid, auth_token)
      end


      def send_message(job_id, host, to, message)
      @client.messages.create(
      from: twilio_number,
      to: to,
      body: message,
      status_callback: "http://#host/jobs/#job_id"
      )
      end

      private

      def twilio_number
      # A Twilio number you control - choose one from:
      # https://www.twilio.com/console/phone-numbers/incoming
      # Specify in E.164 format, e.g. "+16519998877"
      ENV['+17652957305']
      end
      end


      jobs_controller.rb



       class JobsController < ApplicationController
      before_action :set_job, only: [:show, :edit, :update, :destroy]
      before_action :authenticate_user!



      # GET /jobs
      # GET /jobs.json
      def index
      if(params.has_key? (:job_status))
      @jobs = Job.where(job_status: params[:job_status]).order("created_at desc")
      else
      @jobs = Job.all.order("created_at desc")
      end
      end

      # GET /jobs/1
      # GET /jobs/1.json
      def show
      end

      # GET /jobs/new
      def new
      @job = current_user.jobs.build
      end

      # GET /jobs/1/edit
      def edit
      end

      #TWILLIO INITILIZATION

      def send_initial_notification
      @job.job_status = :Wildey_Que
      if @job.save
      message = 'Equip4you: Thanks for dropping your machine off, we will keep you updated here every step of the way'
      notify(message)
      else
      redirect_with_error
      end
      end

      def send_delivery_notification
      @job.job_status = :Completed
      if @job.save
      message = 'Equip4you: Thank you for allowing us to take care of your machine for you, if you have any further questions or concerns feel free to contact 425-9999'
      notify(message)
      else
      redirect_with_error
      end
      end

      #END TWILLIO INIT

      # POST /jobs
      # POST /jobs.json
      def create
      @job = current_user.jobs.build(job_params)

      respond_to do |format|
      if @job.save
      format.html redirect_to @job, notice: 'Job was successfully created.'
      format.json render :show, status: :created, location: @job
      else
      format.html render :new
      format.json render json: @job.errors, status: :unprocessable_entity
      end
      end
      end

      # PATCH/PUT /jobs/1
      # PATCH/PUT /jobs/1.json
      def update
      respond_to do |format|
      if @job.update(job_params)
      format.html redirect_to @job, notice: 'Job was successfully updated.'
      format.json render :show, status: :ok, location: @job
      else
      format.html render :edit
      format.json render json: @job.errors, status: :unprocessable_entity
      end
      end
      end

      # DELETE /jobs/1
      # DELETE /jobs/1.json
      def destroy
      @job.destroy
      respond_to do |format|
      format.html redirect_to jobs_url, notice: 'Job was successfully destroyed.'
      format.json head :no_content
      end
      end

      private

      # TWILLIO INNIT

      def notify(message)
      MessageSender.send_message(
      @job.id, request.host, @job.cell_number, message)
      redirect_to jobs_url, notice: 'Message was delivered'
      end

      def redirect_with_error
      message = "An error has occurred updating the ticket status"
      redirect_to orders_url, flash: error: message
      end

      #TWILLIO INIT END


      # Use callbacks to share common setup or constraints between actions.
      def set_job
      @job = Job.find(params[:id])
      end

      # Never trust parameters from the scary internet, only allow the white list through.
      def job_params
      params.require(:job).permit(:job_status, :purchase_name, :contact_name, :cell_number, :home_number, :other_number, :other_number, :address, :machine_mod, :item_number, :serial_number, :concern, :accessories, :pickup_location, :paid, :invoice_number, :outcome, :avatar)
      end
      end

      Routes.rb

      require 'sidekiq/web'

      Rails.application.routes.draw do
      resources :jobs
      devise_for :users
      root to: 'jobs#index'


      post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
      post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'


      routes.rb



      require 'sidekiq/web'

      Rails.application.routes.draw do
      resources :jobs
      devise_for :users
      root to: 'jobs#index'


      post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
      post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'









      share|improve this question














      I am trying to integrate Twilio and my rails application to send different text messages based on what option is chosen and saved to the database in the form. However after studying the docs and viewing the example applications they provide (Send ETA Notifications), saving the completed form, no text message is sent and I cannot figure out why. I would love some suggestions



      job_status are the options to choose from which the text message body needs to change with:



       JOB_STATUSES = ["Wildey Que", "In Service-Bay", "Awaiting Approval", 
      "Awaiting Parts", "Jackson Collection Que", "Wildey Collection Que",
      "Completed"]


      message_sender.rb



      class MessageSender

      require 'twilio-ruby'

      def self.send_message(job_id, host, to, message)
      new.send_message(job_id, host, to, message)
      end

      def initialize
      # To find TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN visit
      # https://www.twilio.com/console
      account_sid = ENV['---'] (These are entered)
      auth_token = ENV['---']
      @client = Twilio::REST::Client.new(account_sid, auth_token)
      end


      def send_message(job_id, host, to, message)
      @client.messages.create(
      from: twilio_number,
      to: to,
      body: message,
      status_callback: "http://#host/jobs/#job_id"
      )
      end

      private

      def twilio_number
      # A Twilio number you control - choose one from:
      # https://www.twilio.com/console/phone-numbers/incoming
      # Specify in E.164 format, e.g. "+16519998877"
      ENV['+17652957305']
      end
      end


      jobs_controller.rb



       class JobsController < ApplicationController
      before_action :set_job, only: [:show, :edit, :update, :destroy]
      before_action :authenticate_user!



      # GET /jobs
      # GET /jobs.json
      def index
      if(params.has_key? (:job_status))
      @jobs = Job.where(job_status: params[:job_status]).order("created_at desc")
      else
      @jobs = Job.all.order("created_at desc")
      end
      end

      # GET /jobs/1
      # GET /jobs/1.json
      def show
      end

      # GET /jobs/new
      def new
      @job = current_user.jobs.build
      end

      # GET /jobs/1/edit
      def edit
      end

      #TWILLIO INITILIZATION

      def send_initial_notification
      @job.job_status = :Wildey_Que
      if @job.save
      message = 'Equip4you: Thanks for dropping your machine off, we will keep you updated here every step of the way'
      notify(message)
      else
      redirect_with_error
      end
      end

      def send_delivery_notification
      @job.job_status = :Completed
      if @job.save
      message = 'Equip4you: Thank you for allowing us to take care of your machine for you, if you have any further questions or concerns feel free to contact 425-9999'
      notify(message)
      else
      redirect_with_error
      end
      end

      #END TWILLIO INIT

      # POST /jobs
      # POST /jobs.json
      def create
      @job = current_user.jobs.build(job_params)

      respond_to do |format|
      if @job.save
      format.html redirect_to @job, notice: 'Job was successfully created.'
      format.json render :show, status: :created, location: @job
      else
      format.html render :new
      format.json render json: @job.errors, status: :unprocessable_entity
      end
      end
      end

      # PATCH/PUT /jobs/1
      # PATCH/PUT /jobs/1.json
      def update
      respond_to do |format|
      if @job.update(job_params)
      format.html redirect_to @job, notice: 'Job was successfully updated.'
      format.json render :show, status: :ok, location: @job
      else
      format.html render :edit
      format.json render json: @job.errors, status: :unprocessable_entity
      end
      end
      end

      # DELETE /jobs/1
      # DELETE /jobs/1.json
      def destroy
      @job.destroy
      respond_to do |format|
      format.html redirect_to jobs_url, notice: 'Job was successfully destroyed.'
      format.json head :no_content
      end
      end

      private

      # TWILLIO INNIT

      def notify(message)
      MessageSender.send_message(
      @job.id, request.host, @job.cell_number, message)
      redirect_to jobs_url, notice: 'Message was delivered'
      end

      def redirect_with_error
      message = "An error has occurred updating the ticket status"
      redirect_to orders_url, flash: error: message
      end

      #TWILLIO INIT END


      # Use callbacks to share common setup or constraints between actions.
      def set_job
      @job = Job.find(params[:id])
      end

      # Never trust parameters from the scary internet, only allow the white list through.
      def job_params
      params.require(:job).permit(:job_status, :purchase_name, :contact_name, :cell_number, :home_number, :other_number, :other_number, :address, :machine_mod, :item_number, :serial_number, :concern, :accessories, :pickup_location, :paid, :invoice_number, :outcome, :avatar)
      end
      end

      Routes.rb

      require 'sidekiq/web'

      Rails.application.routes.draw do
      resources :jobs
      devise_for :users
      root to: 'jobs#index'


      post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
      post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'


      routes.rb



      require 'sidekiq/web'

      Rails.application.routes.draw do
      resources :jobs
      devise_for :users
      root to: 'jobs#index'


      post '/jobs/new', to: 'jobs#new', as: 'initial_notifications'
      post '/jobs/new', to: 'jobs#new', as: 'delivery_notifications'






      ruby-on-rails ruby-on-rails-4 sms twilio twilio-api






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 7 at 20:57









      Uncle HankUncle Hank

      1214




      1214






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Please check this def. It looks weird.



           def twilio_number
          # A Twilio number you control - choose one from:
          # https://www.twilio.com/console/phone-numbers/incoming
          # Specify in E.164 format, e.g. "+16519998877"
          ENV['+17652957305']
          end





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052681%2fsms-messages-not-being-sent-using-twilio-and-rails%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Please check this def. It looks weird.



             def twilio_number
            # A Twilio number you control - choose one from:
            # https://www.twilio.com/console/phone-numbers/incoming
            # Specify in E.164 format, e.g. "+16519998877"
            ENV['+17652957305']
            end





            share|improve this answer



























              0














              Please check this def. It looks weird.



               def twilio_number
              # A Twilio number you control - choose one from:
              # https://www.twilio.com/console/phone-numbers/incoming
              # Specify in E.164 format, e.g. "+16519998877"
              ENV['+17652957305']
              end





              share|improve this answer

























                0












                0








                0







                Please check this def. It looks weird.



                 def twilio_number
                # A Twilio number you control - choose one from:
                # https://www.twilio.com/console/phone-numbers/incoming
                # Specify in E.164 format, e.g. "+16519998877"
                ENV['+17652957305']
                end





                share|improve this answer













                Please check this def. It looks weird.



                 def twilio_number
                # A Twilio number you control - choose one from:
                # https://www.twilio.com/console/phone-numbers/incoming
                # Specify in E.164 format, e.g. "+16519998877"
                ENV['+17652957305']
                end






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 8 at 4:45









                Dapeng114Dapeng114

                14916




                14916





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55052681%2fsms-messages-not-being-sent-using-twilio-and-rails%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

                    Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

                    Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved