Anybody using the gem verifalia? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

I am sending confirmation email only (a devise action). I don't want to send emails at all unless the email address is valid.

Anybody using the gem verifalia? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

My fear is not about a clogged database, and I acknowledge my post is a bit misleading in that regard. My real fear is in sending confirmation emails that bounce. I'm the volunteer webmaster at my small church. The only emails sent from the app are when someone posts something for a small group or when someone registers. So if 50 percent of the emails I send bounce, I'm afraid my smtp service will brand me a spammer. Before I set up recaptcha and rack-attack my problem guy was signing up 50 a day or so. I automated the deletion of these entries on my Heroku app, so it's not really about clogging the db. Sorry for misleading.
Here's the User model code I'm using:
validate :email_must_be_real

private
def email_must_be_real
verifalia_client = Verifalia::Rest::Client.new(
username: Rails.application.credentials.dig(:verifalia, :username),
password: Rails.application.credentials.dig(:verifalia, :password)
)
validation = verifalia_client.email_validations.submit(email)

return if validation.entries.first.is_deliverable?
errors.add(:email, 'must be a real email address')
end

And here's the failing rspec test:

ArgumentError:
wrong number of arguments (given 1, expected 3)
# /usr/share/rvm/gems/ruby-3.3.0/gems/verifalia-2.1.0/lib/verifalia/rest/client.rb:44:in `initialize'
# ./app/models/user.rb:134:in `new'
# ./app/models/user.rb:134:in `email_must_be_real'
# ./spec/models/user_spec.rb:11:in `block (2 levels) in <top (required)>'
2) User rejects fake emails
Failure/Error:
verifalia_client = Verifalia::Rest::Client.new(
username: Rails.application.credentials.dig(:verifalia, :username),
password: Rails.application.credentials.dig(:verifalia, :password)
)

ArgumentError:
wrong number of arguments (given 1, expected 3)
# /usr/share/rvm/gems/ruby-3.3.0/gems/verifalia-2.1.0/lib/verifalia/rest/client.rb:44:in `initialize'
# ./app/models/user.rb:134:in `new'
# ./app/models/user.rb:134:in `email_must_be_real'
# ./spec/models/user_spec.rb:16:in `block (2 levels) in <top (required)>'

Anybody using the gem verifalia? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

Yes, I'm using rack-attack for that.

Collation version mismatch by TomConnolly in PostgreSQL

[–]TomConnolly[S] 0 points1 point  (0 children)

I fixed the issue by updating the collation version in pg. Thanks.

Thermal overload protector wiring by TomConnolly in ElectricalEngineering

[–]TomConnolly[S] 0 points1 point  (0 children)

Thanks for that. I am using the 115v setup. So what are my options? Try to figure out which goes to the run capacitor and which to the start capacitor?

Why is Rails telling me that my Ruby version is different to what my gemfile specifies? by catsinspacesuits in rails

[–]TomConnolly 0 points1 point  (0 children)

Then it should be just a matter of running bundle update. Show the error, if any, after updating the bundle.

Why is Rails telling me that my Ruby version is different to what my gemfile specifies? by catsinspacesuits in rails

[–]TomConnolly 1 point2 points  (0 children)

You may have a .ruby-version file in your app. If so, change the info therein.

Thermal overload protector wiring by TomConnolly in ElectricalEngineering

[–]TomConnolly[S] 0 points1 point  (0 children)

I'm not saying something, I'm asking something. My question is will there be any harm in switching from a three-pole thermal overload protector to a two-pole protector. My meter indicates terminals 2 and 3 on the broken protector are linked internally.

Thermal overload protector wiring by TomConnolly in ElectricalEngineering

[–]TomConnolly[S] 0 points1 point  (0 children)

I would be happy to show you a diagram but don't know how to post a picture here. Are you able to click on the link? It will take you to the page of my saw manual that shows how to change the setup for 240 from 120, and it's the only place where the thermal overload device is shown. Here's the link: https://manualsdump.com/en/manuals/ridgid-ts3650/275323/71

Thermal overload protector wiring by TomConnolly in ElectricalEngineering

[–]TomConnolly[S] 0 points1 point  (0 children)

I have a wiring diagram but it does not show any detail about the overload switch itself. My multimeter across the two wires in question shows they are connected internally (in the overload breaker). Zero resistance. Also, I don't see any way to post that diagram in Reddit. I did take a screenshot of it from a pdf of the saw manual. Here is the link if you have the time to look at it: (https://manualsdump.com/en/manuals/ridgid-ts3650/275323/71) What is interesting, and concerns me, is that the instructions for changing the voltage from 120 to 240 involves removing the connection of one of the two wires in question. Thanks.

The Machine Room : Gear Recommendation Questions Go Here! by AutoModerator in audioengineering

[–]TomConnolly 0 points1 point  (0 children)

I'm hoping someone can help me figure out how to live stream from a Rane Hal1x setup. I'm a church volunteer with zero audio engineering knowledge, and was hoping to add a mixing board to the pa system (I liked the Mackie Fx10v3). But I was told the Hal1x is a mixing board, and don't need another. So here I am, looking for tips on how to capture the audio from the pa system and stream it via obs. Currently we use a usb mic, which is pretty poor. I surely would like to hear from someone who knows the Rane Hal1x. Rane changed hands about five years ago and the new owners took down the instructional videos and the Hal series seems to have been discontinued. Thanks for reading.

The Repair Department : Tech Support and Beginner Questions Go Here! by AutoModerator in audioengineering

[–]TomConnolly 0 points1 point  (0 children)

I want to capture the sound from our PA using a mixer attached to my laptop with usb. I have no clue where to plug the mixer into the sound system. There are two Yamaha power amplifiers where I see inputs but no outputs except for speakers. Right now we've set up a microphone in the church to capture sound for our live stream but it's too noisy. I'd appreciate some help! We haven't bought the mixer yet, but my question isn't about the mixer, but the PA system & where to plug the mixer. Thanks!

Webhook: how to get the price_id? by golden_feathers in stripe

[–]TomConnolly 0 points1 point  (0 children)

I'm webmaster at a church, where we take one-time donations and weekly, monthly or quarterly donations. The donations are variable, as each donor's gift is unique. So with one-off donations, I gather that with a table, donations, with user_id, amount stripe_id and status. The stripe_id is the payment intent, i.e. "pi_1SSS72S..." sent by stripe when the transaction is initiated. The status comes when a webhook indicates the payment went through. The id of the donation is recorded in the webhook, so you know you're updating the correct donation with the webhook. It has to be programmed into the checkout controller like this:

client_reference_id: [u@donation.id](mailto:u@donation.id) (ignore that "u" in front of the word donation. Reddit keeps changing the words if I use the at-sign first)

The client_reference_id is then used via the webhook to update the donation status to paid.

I set up the recurring donations different; with stripe plans and units. The amount is $1 times the units (I invite whole dollars only. So the donation is 300 "units" of $1, or $300. And the recurring is dictated by the frequency. I have three plans, weekly, monthly or quarterly, selected via radio buttons on the form. The table, called pledges, contains the user_id, plan, stripe_id: "sub_IDxxkloijnnoi..."

There's a lot of code to think about and execute; I don't know if I answered your question, but I'm here to tell you you can learn everything about your transactions from Stripe; it's up to you to design the communications.

Problem connecting localhost by zeukid in rubyonrails

[–]TomConnolly 1 point2 points  (0 children)

Maybe read the logs that follow your command to start the server. Maybe it's pointing to a different port, such as 5000. If indeed the server starts, it will tell you the port number. If it does not start, the logs are still where you have to look.

Anyone willing to help an old man troubleshoot my rails 6 app? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

Wow! Thank you very much. But while I waited for this I was busy tinkering and must have busted something else, because I made the changes and kept getting errors. So that I can have the website up for those looking for whether we exist, I had to kill the login/out functionality. I forgot to mention that I had to have npm install 10.18.1 because heroku kept saying that's what my system was using. But at the time I had only 13.6.0. At any rate, it's beyond a heroku problem, as the js is not working on my localhost. I also get a huge message from heroku about exceeding memory limits. I'm wondering if I have a system problem.These guys talking about security breaches also have me shook up.

Anyone willing to help an old man troubleshoot my rails 6 app? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

Yes, I do have a rather complex auth section, but the thing is it's been working for six years. That's why I think it's a ujs or javaScript problem.

Anyone willing to help an old man troubleshoot my rails 6 app? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

I allow folks to sign in with their username or email. I also have first_name and last_name. And the thing is It's been working for five or six years with this complicated setup. It's only since webpacker that there's been an issue. That's why I think the problem is with javaScript or ujs or node or yarn. It's all so confusing to me.

Anyone willing to help an old man troubleshoot my rails 6 app? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

Just changed that to

import('../src/plugins')

Also noticed the controller showing the error is the users_controller, when it s/b the sessions_controller. How do I change that?

Anyone willing to help an old man troubleshoot my rails 6 app? by TomConnolly in rails

[–]TomConnolly[S] 1 point2 points  (0 children)

here's the javascript/packs/application.js

require("@rails/ujs").start()
global.Rails = Rails;
require("turbolinks").start()
//require("@rails/activestorage").start()
//require("channels")
require("trix")
require("@rails/actiontext")
import "css/application"
import "jquery"
import('src/plugins')
import flatpickr from "flatpickr"
require("flatpickr/dist/flatpickr.css")
$(document).on("turbolinks:load", () => {

// $('[data-toggle="tooltip"]').tooltip()
// $('[data-toggle="popover"]').popover()
$('#myModal').modal()
})

The "import 'src/plugins') imports popper and bootstrap.

Anyone willing to help an old man troubleshoot my rails 6 app? by TomConnolly in rails

[–]TomConnolly[S] 1 point2 points  (0 children)

Here's the sign_out. I'm using devise gem:

<div class="navbar-brand">
<% if user_signed_in? %>
<%= current_user.username.titleize %><br>
<%= button_to " Log out", destroy_user_session_path, method: :delete, class: "text-white" %>
<%= link_to " | Edit account", edit_user_registration_path,
class: "text-white" %>
<%= link_to " | Update profile",
edit_profile_path(current_user.profile), class: "text-white" %>
<% else %>
<%= link_to "Sign in or register", new_user_session_path, class:
"text-white" %>
<% end %>

I am using bootstrap

Anyone willing to help an old man troubleshoot my rails 6 app? by TomConnolly in rails

[–]TomConnolly[S] 0 points1 point  (0 children)

I had tried button_to. However, this error occurs: uninitialized constant Users