Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

305
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!