danielricecodes

1

votes
0

answer
37

views

Remove Daylight/Standard time character using %Z and `strftime`?

Is it possible to remove the Daylight/Standard time indicator using strftime and %Z? I'm using localization inside of a Rails app and its reporting the timezone as 'PDT' and 'PST' - but really all I want is 'PT' - without the D or the S. I don't see a Format Directive for this in strftime's documen...
danielricecodes
1

votes
1

answer
228

views

Fixing uninitialized constant OpenSSL::Digest::DSS on Mac OS Sierra with RVM

I just solved a difficult problem on my Mac (High Sierra) and wanted to share so others can fix it more quickly than it took me. The specific error was uninitialized constant OpenSSL::Digest::DSS when trying to use any Ruby gem that used Net::SSH. In my case the Net::SFTP gem would not connect to a...
danielricecodes
1

votes
1

answer
52

views

Ruby 2.5.1, Ruby Java Bridge (RJB), and Ubuntu 18.04: Getting `Constants DL and Fiddle is not defined.`

I need help. I can't figure out why I can't boot my Rails 5.2 app now that rjb is a dependency. I keep getting a generic error about Constants DL and Fiddle is not defined. First, yes I have read the Documentation. Second, yes I have set JAVA_HOME. $ echo $JAVA_HOME /usr/lib/jvm/java-8-openjdk-am...
danielricecodes
1

votes
3

answer
274

views

How to get Google to forget I had an SSL site with Heroku SSL

I have a website, http://www.scubastic.com, which I use as a playground app for Ruby on Rails development and SEO hacking. I have run into an issue that I can not seem to fix on my own and it revolves around SSL, SEO, and Heroku. TL;DR: I had an SSL site and I disabled it but Google still remembe...
danielricecodes
1

votes
1

answer
493

views

How do I set encryption settings per Devise Class?

Hi StackOverflow community, I'm trying to solve an issue whereby I am wrapping Devise around a legacy model in a Ruby on Rails 3.2 application. In this app, I actually have 2 pre-existing devise models: Representative and Admin. These two classes use all standard devise configuration and use defaul...
danielricecodes
1

votes
0

answer
8

views

Random RSpec failures comparing Floats (Eq matcher)

I'm not even sure where to begin here. Sorry if this is a duplicate, but I don't even know what to search for or what this particular issue is called. Randomly, and not all that often, a test in my RSpec suite will fail and I'll get an error like this: expected: 0.69 got: 0.69 (0.69e0) (compared us...
danielricecodes
4

votes
1

answer
2.2k

views

Why does remote: true and confirm: 'Are You Sure?' not work together?

I have been wrestling with Rails 4 and UJS and noticed that Rails 4.1 doesn't behave (specifically, rails-ujs) the way I would expect. When using a remote link with a confirmation dialog, the UJS driver sends the XHR before the confirmation popup is approved (making the confirmation popup pointles...
danielricecodes
4

votes
0

answer
99

views

Rails Not query on entire Where clause

Is there a straight-forward way to negate an entire where expression using ActiveRecord/ARel? It seems that where.not(), when given a hash of arguments, negates each expression individually, as opposed to negating the entire thing with a single SQL NOT. Rails Example Thing.where.not(attribute1: [1,...
danielricecodes