I've upgraded my Ruby version from 2.5.x to 2.6.x (and uninstalled the 2.5.x version). And now Puma server stops working when instantiating a client of Google Cloud Text-to-Speech:
client = Google::Cloud::TextToSpeech.text_to_speech
It just exits without giving an error (in Command Prompt). And there is a 'Segmentation fault' message in the 'bash' terminal.
Puma config-file:
max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
threads min_threads_count, max_threads_count
port ENV.fetch("PORT") { 3000 }
environment ENV.fetch("RAILS_ENV") { ENV['RACK_ENV'] || "development" }
pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
preload_app!
plugin :tmp_restart
The method that works with Google Cloud Text-to-Speech:
require "google/cloud/text_to_speech"
# Instantiates a client
client = Google::Cloud::TextToSpeech.text_to_speech
...
Gemfile:
gem 'rails', '6.0.1'
gem 'puma', '3.12.2'
gem 'google-cloud-text_to_speech', '1.1.1'
...
OS Windows 10.
I'm confused. I don't understand why it happens and how to fix it. I've tried to use the last gem-versions for 'puma' and 'google-cloud-text_to_speech', reinstalled the Google SDK, but it continues happening.
Maybe something's wrong with my credentials?
I get the nil
value when running the configure
method (before instantiating the client):
(byebug) Google::Cloud::TextToSpeech.configure
<Config: endpoint="texttospeech.googleapis.com" credentials=nil scope=nil lib_name=nil lib_version=nil interceptors=nil timeout=nil metadata=nil retry_policy=nil quota_project=nil>
Can somebody please help me?