EOF Error When Sending Mail With Sidekiq - ruby-on-rails

When I try to send emails using sidekiq, it fails with the error:
EOFError: end of file reached
If I send the email using ActionMailer, the email gets sent no problem.
This works just fin:
InfractionMailer.alert.deliver
This, however, fails:
InfractionMailer.delay.alert
I am using SMTP through Office 365.
Sidekiq: 3.1.4 (also happened with 2.17.7)
Rails: 3.2.13

Turns out it was an issue with the OpenSSL included in RVM's ruby-2.0.0-p353. Upgrading to ruby-2.1.1 solved the issue

Related

Mailcatcher return Net::SMTPFatalError

I installed mailcatcher on my rails app but i still have this issu when i try to send an email :
Net::SMTPFatalError: 554 5.7.1 <lfbn-nan-1-1744-85.w90-104.abo.wanadoo.fr[90.104.17.85]>: Client host rejected: Access denied
Already tryed different fix/config found on internet but nothing is working.
ruby 3.1.2
rails 7.0.3.1
Any idea ?
Thanks

Rails 6.0 Resque Redis and Auth

Im using rails 6.0 with resque, redis and I can't get rails server to start because i've got AUTH issues and get the following when i start rails server
vendor/bundle/ruby/2.7.0/gems/redis-4.6.0/lib/redis/client.rb:162:in `call': NOAUTH Authentication required. (Redis::CommandError)
i've tried putting the following into config/initializers/resque.rb and i've also tried it in environment.rb
Resque.redis = Redis.new(:password => 'myresquepassword')
If i fire up cli and put the the password in I can run commands no bother
Any ideas ?
The answeris that resque does not have support for authentication in 2.2.1, so its not possible

Ruby on Rails crash during request

I use windows, ruby 2.5, rails 5.1.7, I have a controller with get request, from Unirest or RestClient libs. When I trigger it, the RoR server closes, I see windows error about ruby.
The same request command processed in rails console fine.
That theme was not helped Ruby on Rails server crashes during a HTTPS POST request
UPDATED
Rubymine log error:
Process finished with exit code -1073741819 (0xC0000005)
Controller code:
u = RestClient.get('https://google.com/')
Windows error 0xC0000005 is memory access violation, it means that something is wrong with binaries - most probable native gem extensions or ruby itself,
so try bundle pristine to reinstall gems and if that does not help - cleanup and reinstall ruby.

Rails accessing Desk.com api results in RuntimeError concerning FaradayMiddleware

I was pairing with a coworker, and after writing a feature using the desk.com api, everything was working fine. It was deployed to a staging server, where it too worked fine. However, when I run the code on my local dev machine, when I try to query the api (for example, request all the users on our account), I get a runtime error.
I'm using the desk ruby gem: https://github.com/chriswarren/desk
Here is a session in the rails console:
[1] pry(main)> Desk.users
RuntimeError: missing dependency for FaradayMiddleware::Deashify: undefined method `type' for class `Hashie::Mash'
from /home/rooney/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/faraday-0.9.1/lib/faraday/middleware.rb:20:in `new'
This is the error I get. I haven't been able to find any info on this error. If anyone needs more info just ask.
Methods "type" and "id" are removed in Hashie version >= 3.4.2
You can fix by rolling back to Hashie v3.4.1
Are you using bundle exec? It's possible that you're using the wrong version of a gem. Try uninstalling versions of the gem other than the one you need.

Rails authenticate_or_request_with_http_basic not working on SSL + Nginx

I've get an action in my Rails 3 app that I'm pw-protecting with authenticate_or_request_with_http_basic. Working fine on my development machine but it's not prompting for the http_basic user/password on the production server.
The entire production app runs over https/SSL on nginx.
Where do I look to resolve this? Does http basic auth not work over SSL? Or is there an nginx setting I need to look at?
TIA
Not sure if this related to Rails 3.
I just recently had problems running Mongrel 1.1.5 and Rails 2.3.8
Apparently, there is a bug in this set up where our production machine does not prompt for the user name and password (but works locally, because we are using web-brick).
In the mongrel.log we keep getting this error:
Error calling Dispatcher.dispatch #split' called for nil
:NilClass>
/usr/local/rvm/gems/ruby-1.8.7-p174/gems/actionpack-2.3.8/lib/action_controller/cgi_process.rb:52:indispatch_cgi'
/usr/local/rvm/gems/ruby-1.8.7-p174/gems/actionpack-2.3.8/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
...
Found the monkey patch needed to fix this Mongrel 1.1.5 and Rails 2.3.8 and it worked for me.
The german site that lead to the solution: http://railssprech.de/ with 2 links for 2.3.8 and 2.3.9.
Here is the 2.3.8 version: http://www.pcoder.net/error-calling-dispatcher-dispatch/#axzz1RknBQso2
The patch explains why this error was occurring. Check the Rails 3 CGIHandler.dispatch_cgi method and see if it the same bug. You may need to extract the Rails 3 out and monkey patch it.
Hope this helps.
BTW: Mongrel 1.1.5 and Rails 2.3.5 works!

Resources