Seer working in everything but latest IE browsers - ruby-on-rails

I'm maintaining an old rails 2.x app that is slated for retirement after this summer.
It uses the Seer gem to create a simple barchart and has always worked like a champ in every browser.
Now, however, it won't work in the most recent versions of IE. The code itself hasn't changed in two years. It works in every other browser.
It WILL work in IE in compatibility mode. The javascript is sent to the browser but the browser won't render it.
Seer is an old gem and this is an old app....I understand this is a bit of a hail mary.
Anyone else run into this problem? I would post the code but I believe this is one of those questions that will either be instantly recognizable to someone if they've seen it before.
Thanks!
EDIT: the gist of the js is here: https://gist.github.com/crowell256aa/9200487

That gem uses the old and deprecated "barchart" package for drawing charts. Since that package predates the arrival of IE9, I suspect that it is trying to create VML code in IE 9+, which is probably the cause of the code not working. The fix for this is to use the modern "corechart" package instead.

Related

Ruby on Rails link generated with link_to helper no longer works in Chrome

Chrome has been making a lot of changes recently, and one of them has broken a code statement I use to retrieve a document stored in a database, related to a parent record. The action to upload the file and create the attachment relationship is working, so my users can still add documents. They can no longer download and view stored document attachments. The code is using the link_to helper method, and appears to be building the link correctly, verified by the fact that it still works using Edge, so my users have an ugly workaround, but I need to understand what is happening. I have confirmed that it is indeed Chrome that is the problem, because at first I couldn't recreate the defect in development (until I updated my Chrome browser to current version.) Now I can recreate the defect in my development environment.
When the link in my form is clicked, Chrome displays an error screen with this text:
This page isn't working
(*localhost*) sent an invalid response
net::ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
If I extract the link using developer tools and try and execute it in an empty browser window, I get the same error.
The link is constructed like this:
(*name of the file attachment*)
Before you ask, yes, I have confirmed there are no commas or quotes in my file names! lol
I am hoping someone somewhere can point me to a solution, hopefully simple, maybe obvious, that I can use to get my web form to play nicely with Chrome again - application code change, web server configuration (I am running on RHEL7 Apache in production and Puma in development, my database is Oracle, and I am building with Ruby 2.3.6 and Rails 5.1.5, along with many many gems).
I hope I have covered all the relevant points. Thank you for taking the time to read this post!
Issue has been resolved by upgrading gem attach to version >= 1.0.5. Many thanks to the gem author for excellent responsiveness.

ActiveAdmin with IE8

I have a client from which we have to develop a Rails app which requires the admin to work in IE8.
I usually develop websites with the git version of ActiveAdmin but I've noticed here and here that IE8 is not supported.
My questions are:
can I use it anyway?
if so, how much do I lose?
what's the last version of ActiveAdmin to support IE8?
I'm the guy that has written the noticed.
There is no strict point where active admin break with IE8. We only say, we don't support IE8, we don't give any guaranty that it will be work and we don't accept changes to fix IE8 problems.
You can use it, but you should test every JS/CSS related thing on IE8!
BTW: IE8 is no longer supported by Microsoft, so you customer should update his systems for security reasons. Would you dring 7 years old milk? ;)

Bootstrap 3.1.1 with iOS Emulator

In my site I used Bootstrap 3.0.2. All is working pretty great both on desktop and in my iOS emulator, where I test it for iPhone users.
However, when I tried to changed to Bootstrap 3.1.1, I can't seem to click on anything in my Web App (not links, not buttons, etc.). The site with 3.1.1 works pretty good on my desktop (with safari).
Any thoughts on why this happens?
Update:
Did a little debugging, and the problem seems to be with this line I use:
$('.modal-backdrop').remove();
This is a hack I use to clear a modal that .modal('hide') didn't take care of for some reason. Can anyone think of why this makes the iOS stop responding to clicks?
Thanks
As it turns out, iOS has a problem with "modal fade", so I just changed it to "modal".
This is probably not effecting bootstrap before 3.0.3, but when I changed it, the remove probably made the touch disabled somehow.
Works now.

Jquery mobile with phonegap is not styling properly for mobile app

I'd like to say that I solved the problem but I wanted post this here as a reference if anyone else is having the same problem.
I've been following this tutorial: http://wiki.phonegap.com/w/page/41524872/JQuery%20Mobile%20Tutorial%20(iOS)
to incorporate jquery mobile into my application. I am using the latest jquery library which is 1.7.2.
I can't get the outcome shown in the tutorial. Styling, behaviour, nothing works properly.
I've been smashing my head off of my desk for 6 hours trying to get this stuff to work and finally resolved it with the following combinations;
used;
cordova-1.6.0.js (with the associated script declarations in the header)
jquery.mobile-1.1.0.css
jquery-1.6.4.min.js
jquery.mobile-1.1.0.js
it was a very frustrating morning. thanks for pushing me into the right direction.
Turns out jquery mobile doesn't support the newest jquery library.
As soon as starting to use jquery 1.6.1, everything started to look and behave as shown in the tutorial. Why it is not compatible with an older version is beyond me. I probably should've followed the tutorial step by step but honestly, I thought newer versions of jquery are supposed to be better and backwards compatible.

Is More (Less CSS plugin for Rails) still recommended?

The Less gem has been superseded by less.js, which runs on the server with Node.js. More, the "official" Less plugin for Rails, hasn't been updated since June 14, 2010.
In light of all that, what is the recommended way to use Less with Rails these days? I suppose I could always just use client-side JS for this, which everyone seems to be embracing. But I'm not crazy about relying on client-side JS just to transform a stylesheet, especially considering that I'd like to degrade gracefully. I realize that Less.js is considered very fast, but as a matter of principle, I don't want my CSS to be utterly dependent on the browser's JS engine.
Assuming I want to compile Less server-side, what is the best practice these days for use with Rails? I know you can run Less using Node.js, but I'm looking for nice Rails integration such as we once had with More.
I'm looking for something that will work on Linux and Mac. Ideally, it would be a gem or a Rails plugin, not a standalone app.
Update: I'm looking into whether The Ruby Racer can be used to embed Less.js into a Rails app. Does anyone have opinions on that?
Update 2: This question is really old, but for anyone who's still interested, I just wanted to point out that Rails 3 comes with SCSS integration out of the box. SCSS is a LESS competitor, and I'm quite happy with it.
Try out less.app for Mac OSX. http://incident57.com/less/
Use it on your local dev to generate the CSS.
My only complaint is that the parsing sometimes gets tripped up on IE specific CSS rules that are invalid CSS but were handled fine by the more gem.
Also it doesn't handle the less partials (_file.less) that more does.
Bryan here, developer of Less.app
You can handle ANY IE-specific code in Less just by using the escape function, which takes a string. Thus, you could write: e("filter:alpha..."); in your LESS file and it will compile to the expected IE-specific (though non-standard) CSS.
See Lesscss.org for more info. The bit about the e() function is all the way at the bottom of the docs.
May be not helpful at all, but the approach we currently use (PHP/node dev) is client-side .less during development, and delivering compiled .css on deploy, using lessc. That can be integrated into build scripts or commit hooks, no bundled magic :)

Resources