Quantcast
Channel: Active questions tagged ruby - Stack Overflow
Browsing all 4612 articles
Browse latest View live
↧

Trouble sending emails using Action mailer in rails 7

I am having trouble sending emails via action mailer in rails 7 app. Now If I configure my action mailer using gmail, it works fine and sends emails as expected. The setting is...

View Article


Error while doing bundle install with jruby

Currently, I am using jruby 9.2.20.1 (2.5.8) and I am getting below error:enter image description hereI am tried different versions of jruby, but it is giving the above error. Below are the versions in...

View Article


Getting ActionDispatch::Request::Session::DisabledSessionError after...

I recently upgraded my application to rails 7 and now a bunch of my tests are failing with the below error.ActionDispatch::Request::Session::DisabledSessionError: Your application has sessions...

View Article

dragonruby Dir class not supported?

I'm attempting to iterate through files in a sequence to create a small animation using DragonRuby, but I'm encountering an error when attempting to use the Dir class, which is commonly used in Ruby....

View Article

Foreman start on Windows 10 issue

Environment:Windows 10 x64Ruby: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x64-mingw32]Node: v16.13.1npm: 8.1.2Problem Statement:Running webpack script inside Rails project in Windows 10 x64...

View Article


Ruby: Make a global method that checks my class's type (Pair)

I am trying to create a global boolean method that checks if a variable is of type Pair (my own customized class). However, when I try to run it, I get the errorProject4.rb:83:in `<main>':...

View Article

C# ?? operator in Ruby?

Is it possible to implement the ?? operator in Ruby?a = nilb = 1x = a ?? b # x should == 1x = b ?? 2 # x should == 1

View Article

How to get the rightmost digit from an Integer - Ruby

I am working on a program that requires me to read in and validate a number, but in doing so I need to take a two digit integer (for example we'll say 18) and add it 1 + 8. Now I have it working where...

View Article


Why is aws-sdk-ruby connecting to '169.254.169.254' on initialization?

I installed the gem webmock, which blocks external connections during the test suite. After I installed it, I got an unexpected result when running the test suite. I'm somewhat confused why the aws-sdk...

View Article


Sinatra params empty but payload is fine

I have a form submission in Sinatra that's not showing any received params. Chrome is showing the form submission payload as proper, so the form is fine. It's just not making it through to Sinatra for...

View Article

How to get API and manipulate it

With Ruby, no Rails, how can I call an API such as http://api.anapi.com/, and later get a value and check if it is greater than 5?If it contains an array called anarray which contains hashes, in one of...

View Article

rails render_to_string giving errors with partial view

I am getting ActionView::MissingTemplate error when using render_to_string method with partial views, below the code bizz = render_to_string(:partial => "biz_new",:layout => false)Even though i...

View Article

How to specify env with terraform and github actions so valid environment.rb...

I am setting up a staging server on GCP.Steps followed are -Uploaded docker image to Artifact RegistryUsing Cloud SQL for databaseUsing Cloud RunI am using terraform configuration. I can deploy it but...

View Article


How to refresh google authentication credentials in Ruby

I am able to complete an auth flow to get a user's credentials -- however, I want to make sure that I can continue to use these credentials without them expiring. I am fully aware of rules for token...

View Article

How to refresh access_token for the Google API with Ruby client?

I have a working app (Rails) that authenticates a user and saves her tokens in a Redis store. If I've understood it correctly, using googleauth together with google-api-client, the client object will...

View Article


Why is changeset for Paper Trail empty?

I recently upgraded my Ruby to 3.1.2 and Rails to 7.0.3.1.Somewhere in the changes, one problem I noticed is that my Paper Trails (paper_trails gem) info was now not working, at least with respect to...

View Article

bundler: failed to load command: rspec

I am new to Rails and I want to run Rspec using Mac.When I run: bundle exec rspec spec/00_hello_spec.rb I get the following response:bundler: failed to load command: rspec...

View Article


Using Watir and Selenium how to add certificate to profile for Firefox?

I'm trying to run Firefox via the Watir gem with a predefined profile that has a certificate for authorization. I created a new profile for Firefox and manually added the certificate. Now I can't run...

View Article

Is there a built-in method or gem that can print a Ruby array in columns?

I have a large Ruby array that I would like to print in columns, just like the default output of Unix''ls' command (on OS X, at least). Is there a gem or built-in method that can do this? I am aware of...

View Article

Ruby on Rails , No Rakefile found error

I installed ruby on rails, postgres.I installed all required gem files,I created a project as http://guides.rubyonrails.org/getting_started.html wantsI added below code in...

View Article
Browsing all 4612 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>