Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

308
Vistas
Rails. Puma stops working when instantiating a client of Google Cloud Text-to-Speech (Windows)

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?

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Try reinstalling ruby-debug

sudo gem uninstall ruby-debug
sudo gem install ruby-debug

And, can you expand your question with including your Gemfile, and Gemfile.lock

Another aproach may be deleting Gemfile.lock then running bundle install

rm -rf Gemfile.lock
bundle install
over 4 years ago · Santiago Trujillo Denunciar

0

Ok, I've found the reason for this mess.

It's not about the Ruby version update. I run bundle update after re-installing Rails, and it updated google-cloud-text_to_speech-v1 and google-cloud-text_to_speech-v1beta1 versions in my 'Gemfile.lock' file. And with these updated versions I had the errors I described above.

So, the solution is: do not run complete bundle update, update only exact spots you need (in my case I just had to run bundle update mimemagic in order to have the ability to start Rails server).

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda