Ruby on rails : problem of verifiying the SSL certificate while installing bundle

I’m new with ruby on rails and while creating my first project with this command rails new n_project, i got this error

run bundle installFetching source index from https://rubygems.org/ Retrying fetcher due to error (2/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see .... To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (3/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see .... To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
Retrying fetcher due to error (4/4): Bundler::Fetcher::CertificateFailureError Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see .... To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most
likely your system doesn't have the CA certificates needed for verification. For
information about OpenSSL certificates, see ...

Source: Ruby on rails : problem of verifiying the SSL certificate while installing bundle

I develop software using a pretty varied mix of technologies, including C#, VB, Postgres, SQL Server, and Azure services of all kinds, but mostly Ruby on Rails. After 15 years of using it, I find that it remains one of the most force-multiplying tech stacks in the world. With it, by myself, I can develop software faster than entire teams of outsourced, waterfall-managed, Java/React projects. (And I proven that multiple times.) Not only that, but the future is looking even brighter with Rails 7.

Anyway, I develop software on my personal MacBook Pro, upload it to a git host, and deploy it to a Linux VM on Azure. But my work-supplied laptop is, of course, a bog-standard, boring Dell running Windows. I feel an obligation to be able to use it to do everything I would normally do on my Mac, just in case the hammer falls, and they outlaw the way I work. So, on Windows, I use RubyInstaller. But, thanks to my company’s bog-standard industry practices of using Cisco products to lock down the laptop within an inch of usability, I’ve been unable to do a bundle update for awhile now, getting the error listed above.

I had previously worked around this situation by using CNTLM to tunnel command-line-based HTTP/S requests through my company’s firewall. This was no longer working.

I tried changing my Gemfile to use HTTP, instead of HTTPS. I tried getting gem to ignore SSL errors (and use HTTP sources). None of this worked either.

Yesterday, I had finally had enough of the problem, and decided to work through it. Helpfully, the error message included the fact that I was missing the Cisco Umbrella CA certificate in the certificate chain. Also helpfully, Cisco has a page where you can download their certificates. Also helpfully, I found the linked StackOverflow Q/A. That got me started, and I finally figured out the RubyInstaller people have anticipated this problem, and there’s a proper way of adding a certificate to your chain. This allowed me to get rid of all the hacky workarounds, and now bundler works like I expect it to work on my work laptop.

Windows 11 screenshots leak, show new Start menu and more

Screenshots reveal new Start menu and taskbar design.

Source: Windows 11 screenshots leak, show new Start menu and more

All I can say is, gosh, that Taskbar looks an awful lot like the one in macOS.

Also — and I’m just guessing, but — this new version will continue to have weekly, root-level, 0-day exploit patches.

Again, I posit that Windows is almost completely irrelevant to anyone, personally, other than PC gamers at this point. (And that demographic is getting hammered by bitcoin mining sucking up all the available gaming video cards.) The only reason that Windows continues to exert its influence on the computer market is company desktops. I have a feeling that, if you could factor corporate licenses out of the data, the computer operating system ecosystem would look completely different than any Ziff-Davis publication would have you believe. I wish I could find sales numbers for “PC” products versus Apple products from a company like Best Buy. Only then could we get a fair picture of what the market for operating systems looks like for actual people.

Windows 10 Cloud PC: The latest info about Microsoft’s new service

What is Cloud PC?

Microsoft Cloud PC is a new “strategic offering” built on top of Windows Virtual desktop, which is an Azure-based system used for virtualizing Windows and applications in the cloud.

According to reports, Cloud PC uses Microsoft’s existing Windows Virtual Desktop and Azure infrastructure to deliver Desktop as a Service and enable a modern, elastic, cloud-based Windows experience.

“It will allow organizations to stay current in a more simplistic and scalable manner,” Microsoft noted in a now-deleted job listing.

Source: Windows 10 Cloud PC: The latest info about Microsoft’s new service

Ug. I suppose it’s because I’ve run across Windows being Windows today, and I’m frustrated with it. Again. As always. Of course, I don’t really know what I expected. I feel this way every time I’m forced to use Windows in anger. I mean, it’s Windows. Cue the Arrested Development meme: “I don’t know what I expected.”

‘Wormable’ Flaw Leads July Microsoft Patches

Microsoft today released updates to plug a whopping 123 security holes in Windows and related software, including fixes for a critical, “wormable” flaw in Windows Server versions that Microsoft says is likely to be exploited soon. While this particular weakness mainly affects enterprises, July’s care package from Redmond has a little something for everyone. So…

Source: ‘Wormable’ Flaw Leads July Microsoft Patches

Every time I read a lede like this, I’m struck with the stark difference between Windows and macOS in terms of security posture. Apple releases patches for their operating system once every couple of months, and they contain a dozen or so patches. Microsoft releases hundreds of fixes every month. Sometimes multiple times a month. HUNDREDS! Every month!

Apples fixes are primarily about local privilege escalation. Microsoft? It seems like every patch note is for a “random interweb haxxor can pwn you”-type of problem. I’m sure I’m being overly generous with Apple, and completely unfair to Microsoft, but the difference in the general nature of the two kinds of problems is also starkly different.

The Microsoft fanboys will say that it’s because Windows is still the majority of the desktop market, but Microsoft has lost a lot of ground lately. macOS is around 15% of the market, making it a perfectly viable hacking target. So that can’t be the reason. I say it comes back to Windows having a DOS heritage, and macOS having a BSD heritage. The foundational assumptions these two systems were built on could not possibly be more different, and the ramifications of those differences are still present 30 years later. One is holding up very well. The other… isn’t.

I bring all of this up because the prevailing wisdom in Fortune 500 companies is that we 1) must run Windows, and 2) load it up with all sorts of first- and third-party software to A) “secure” the system, B) guarantee the integrity of the build, and C) lock it down as tightly as the internal staff can understand and manage. All of this approach is a holdover legacy from the 90’s, where we didn’t have much choice. What were we going to do? Run Linux? As much of a Linux zealot as I was — and continue to be — even I know that’s not workable. Now, it’s become a house of cards, with alternating layers of vulnerability mitigation and policy enforcement.

But macOS has matured. Almost all commercial software runs on it now. (The only things I know of that don’t are high-end CAD/FEA systems, but even AutoCAD does now.) And Apple has grown into a behemoth of a company, in terms of support capability. A truly staggering amount of money is being wasted in the Windows-ecosystem-based approach. It’s time for corporate America to stop — really stop — and think about the situation with a fresh set of assumptions. Do we really need to continue as we have for the past 25 years?

And maybe — just maybe — if we didn’t have to load up the corporate desktop image with layer after layer of software, trying to stem the flow of Windows’ suckage, my work laptop wouldn’t run its fans at full blast all the freaking time…

Windows. And Skyrim. Again.

I’m on vacation. At a beach. I don’t find the beach compelling. So I’m bored. Bored, but with a computer. Unfortunately, for this exercise, the computer is a MacBook Pro. And I want to play Skyrim. I’ve been having just a lovely time playing through it again on a PC I stitched together from parts, but how does one play it on a Mac? Good question.

The first attempt at an answer was to try using Parallels. Again. No bueno. Still no clues on the internet, which just seems wrong. Then again, if it were possible to do this, you’d think Parallels would advertise that fact, along with the other games they say it supports.

The only other realistic avenue was to try using Bootcamp to run Windows on the machine, directly. I’ve resisted this for a long time, because I just didn’t buy a Mac to run Windows games. Philosophy aside, this is surprisingly easy. I even still had the Windows 10 ISO file from when I built the PC, and Bootcamp found it on my hard drive, and offered to use it. I just clicked a couple of times, expanded the partition a bit, and waited. Within 15 or 20 minutes, I was in Windows (and denying all of Microsoft’s telemetry options).

Then begins the process I know pretty well by now:

  • Update Windows
  • Use Edge to install Firefox
  • Use the master key to setup 1Password
  • Get logged into Steam
  • Download and install Steam
  • Install Skyrim
  • Download and install Skyrim Script Extender
  • Get logged into NexusMods.com
  • Download and install Vortex
  • Download the dozen or so mods I like
  • Use Vortex to…

BLUE SCREEN OF DEATH

And this one was like there were 2 interleaved slides forming the BSOD message, and they were jiggling back and forth, stuck down in the lower, left quadrant of the screen, and that was enough for me. It just confirmed that this isn’t something that’s going to be well supported, and I don’t have time for this kind of nonsense any more. I rebooted into macOS, and immediately used Bootcamp to wipe out the Windows partition.

Ah… Windows, My Old “Friend”

I didn’t want to be here again. I swore I was done with Windows. But, here I am.

Years ago, I picked up Skyrim on a Steam sale, and immediately fell in love with it. I got pretty far along with it. I think I was getting to level 70 or so, but memory fades.

Then I discovered modding, and nexusmods.com.

By the time I was done, my character was so OP, and my save files so jumbled, that I lost interest, and started playing other things.

Then Windows 10 came along, and I got caught up in the hype. Since we had an Xbox 360 and an Xbox One, I thought it would be neat to get everything together, and make a Microsoft “family” unit, like you can do in with Apple gear. I upgraded all 3 of my family PC’s, hoping to be able to limit my kids’ screen time through it. Then Windows 10 went crazy, with its adverts and “push ware.” And Microsoft’s “family” thing was a complete fiasco for me. Despite six hours on the phone with Microsoft, I couldn’t join one of my kid’s Xbox account to the family unit. On top of this, the time limits for his new account didn’t work at all. So I downgraded all 3 PC’s back to 7.

Then I bought a PS4, gave my monster game rig to my son, retired the other 2 PC’s, gave away the 360, and washed my hands of Microsoft, and Office.

Skyrim went on sale on the Playstation store, and I thought, “Hey, there won’t be a way for me to break the game with the mods available in the Creators Club.” Turns out I was wrong on that point… but I avoided the OP ones, and I started playing again, just concentrating on the main quest. I got to about level 30 again, and just kept getting bogged down by the slowness, and the controls, the lack of SkyUI for inventory management, and the inability to “fudge” the rules a little, from time to time.

Like, really, I hauled 100 pounds of dwarven scrap metal back from some ruins, to craft thousands of dwarven arrows from it, and level up smithing very quickly. I’m not spending literal hours of real time, chopping firewood for this. I’m going to open the console, and type player.additem 6f993 100, and just get on with it.

So I quit playing.

Then I got a bright idea. Skyrim is an old game, right? It should run on old hardware just fine, right? I still had the old PC’s lying around. Could they run the game better than the console?… I put a 760 in one machine, and quickly found that it would “hitch” every few seconds. I started digging into the problem, and discovered that the machine was so old that it had a Core 2 Duo, and that’s actually below even the modest Skyrim SE minimum requirements.

Another old PC had a Phenom II X6, which wasn’t a bad chip. That was enough to run Skyrim, but the power supply in that machine didn’t have enough juice to run the 760, so I was left with using some 5970 piece of junk. It wouldn’t run the game at all, because it was stuck at DX 9.

Time passed.

Parallels advertised that their latest version supports DX 12. Like a fool, I paid good many to upgrade, only to prove that running Skyrim under Parallels is also a hitch-ridden exercise. If someone has figured out how to make this work well, I’d love to hear about it. It doesn’t seem to be accessing the texture memory of the GPU on the Mac. I don’t know if that’s an architecture limitation or a configuration problem. I couldn’t find anything about this from searching.

Time passed.

I got the itch to play Skyrim again, so I took another look at my Phenom-based computer. I started looking into the detailed power requirements, and thought, you know what? They’re probably just being safe. I could probably run the 760 with the power supply I have, if I just adapt some of the power leads to hook into it. So I ordered what I needed.

Then I thought, hey, let me double check my junk pile. Lo and behold! I had a power supply that could run on the Phenom-based computer, and comfortably power the 760! I had totally forgotten that I had helped a friend with some home networking stuff, and he had given me the thing because he didn’t need it any more. I noticed that it needed one power adapter to plug into the motherboard, so I ordered it too. And then I noticed that I didn’t need the adapter. So I installed it, and got the game loaded, and found that it ran great!

And now I have 3 power adapter cords that I don’t need.

The only niggle now was that I had a lot of noise in the audio line. And it got worse when I actually ran the game. I was just using the baked-in sound card, so I installed a spare Creative XFi card. That didn’t fix it. Then I figured out that the noise was coming from the HDMI line. So I muted it. Then I disabled it. Then I pulled the audio feed from my monitor out of my mixer entirely.

I’ve been using HDMI audio on my PS4 all along, but it has an optical output jack… And I’ve since bought a Thunderbolt 3 dock for my MBP which also has an optical output jack… So I took the opportunity to buy a cheap digital audio switch, and swap out everything for TOSLINK audio.

By now, the game is playing so much better on the PC than the console, there’s no going back. So I did the last step. I bought an SSD, and cloned the HDD onto it. Even on this 10-year-old PC, Skyrim is playing like butter at the 60Hz monitor frame limit, inventory management is a breeze, the controls work well, and load times are, like, half a second.

Skyrim. I can’t believe how much effort this game has caused me to expend. This time, for sure, whatever else happens, I’m finishing the main quest, and putting it to bed. But the whole exercise reminded me of why I have always been drawn to this hobby. Hacking stuff together and figuring out the solutions to all the problems along the way is interesting to me, and I guess I’ve kind of missed it.

Operating System “Ecology”

Back in my days of playing AD&D, each month, Dragon Magazine would feature an “The Ecology of…” some mythical beast. The article would read like a National Geographic treatment of what the creature eats, what places they inhabited, and so on. (The one that sticks with me was about the beholder, which is a uniquely characteristic example.) I still think about the word, “ecology,” a lot, because it neatly captures the immediate surroundings of a particular thing. I suppose talking about the “ecology” of an operating system is taking things a bit too far, but hear me out.

As I type this, I’m cloning a spinning-media hard drive to a solid-state hard drive. It’s already 33% done, so I’m going to have to hurry. To do this, I searched for “clone hdd to ssd”, and read the results. The first several, including a prominent LifeHacker article, talked about using EaseUS Backup to do the job.

Fine. I download software, and install it, and try to use it. Along the way, I’m prompted five times to upgrade to the paid version. Each time, I sidestep the upsell, because LifeHacker has assured me that the free edition is all I need. When I finally get to the actual button that does the thing, I see that this is no longer true.

Fine. Times change, and they felt the need to start charging for this. I get it. I don’t begrudge them. If all else fails, I’ll find a way to do this with Linux, because it’s always possible to do things like this with Linux, and do it for free, if you’re willing to learn the flags of some arcane commands.

But I take another look at the search results, and there’s another possibility: Macrium Reflect. Ah! That’s right. I did this for another computer over a year ago, and that’s what I used, I now recall.

Fine. I download this new program. I have to sign up with an email address to get the downloader. Fine. I register. I get my email. I download the downloader. I run the downloader. I enter my email. I get the downloader running. It downloads the program, installs it, and I’m copying the drive right now. The UI is very efficient, and there’s no annoying upsell come-ons. But I’ve had to click about 25 times to get to the point of doing the thing.

People who’ve never actually lived in macOS, and think that Windows is just great (thank you very much) never see it from our side. In the ecology of Macs, if you want some software, it’s usually quite clear that what you want is either free or paid, and installing consists of downloading a file, opening it, and dragging an icon. That’s it. The difference in the two operating system “ecologies,” in terms of friction and user-hostility, is pretty stark. Window users who have never tried Mac: you have no idea how much nicer life can be.

Aaand the clone is done. Let’s see how much faster Civ V starts up now…

DHH “not yet feeling the awesome” of WSL

This has been one of my all-time favorite Twitter threads. David Heinemeier Hansson, creator of Rails, is trying to “live” in Windows, and set it up to do Rails work. He’s blogging the “experience,” and it’s not going very smoothly. Everyone is telling him to use Windows Services for Linux for this, but he’s “not yet feeling the awesome.” I’ve tried using WSL several times for doing development on Rails applications. I, too, am not feeling the awesome, despite the cheerleading by Windows thought leader Scott Hanselman. Despite my personal experiences with it, given how vociferously people recommend WSL for Rails work on Windows, I kept wondering if I were missing something. I’ll take this as final confirmation that I’m not missing anything, and delete the mental bookmark to go back and try this again when it becomes WSL 3.

Ruby on Rails on Windows is not just possible, it’s fabulous using WSL2 and VS Code – Scott Hanselman

I’ve been trying on and off to enjoy Ruby on Rails development on Windows for many years. I was doing Ruby on Windows as long as 13 years ago. There’s been many valiant efforts to make Rails on Windows a good experience. However, given that Windows 10 can run Linux with WSL (Windows Subsystem for Linux) and now Windows runs Linux at near-native speeds with an actual shipping Linux Kernel using WSL2, Ruby on Rails folks using Windows should do their work in WSL2.

Source: Ruby on Rails on Windows is not just possible, it’s fabulous using WSL2 and VS Code – Scott Hanselman

I’ve been doing Rails for about 13 years as well, and I’ve been following Scott for probably about that long. Heck, being a tech evangelist for Microsoft, it was probably him that alerted me to the fact that WSL was being put into Windows to begin with. And using it for Ruby on Rails development is precisely why I wanted it. So when it was first released in Windows 10 Insiders Edition, I hastily upgraded my gaming rig to try it out.

There were literal, show-stopping bugs that prevented doing the “normal”  kind of Rails development, where you install a Ruby version manager, then install the bundle gem, then install Rails, then bootstrap your site.

I keep wanting to say “emerge” when I mean “install.” I guess using Gentoo broke my brain, but, really, that’s what’s going on. When you’re doing this sort of thing, you’re installing software that’s dependent on your environment, which is exactly why portage was created.

I filed some bugs, and watched and waited. A couple of them were fixed pretty quickly. But then other problems became apparent, and they weren’t going to be fixed any time soon, so I gave up.

Then they announced the release of a big upgrade to the system. So I tried again. And, again, I found problems that prevented me from being able to develop with Rails. So I gave up, and stopped watching this space.

Now Microsoft has been evangelizing a total rewrite of WSL, and how they’ve made it “native,” and how this fixes compatibility problems and speed issues. But all they’ve done is make the tool a total virtualization of the environment, when the whole point of WSL was that it was not a virtualized environment!

WSL was supposed to bring “open source” development (like Rails, and Node) out of the dark ages on Windows, and make it a first-class workflow on the platform. This was easy to believe, because Microsoft was really lagging in these popular development scenarios, and it could be expected that they were motivated to create a bridge to get back on equal footing with Mac as the platform of choice for working with modern web technologies.

However, the situation on Windows is now worse than ever. It used to be such a hassle to do this kind of work on Windows that you’d install VirtualBox, create a VM, map your VM’s drive onto a Windows mount point, and run your development tools on the files in the mounted drive. Now, WSL2 is basically doing that for you, and not even giving you the courtesy of a GUI to manage the virtualization settings. I guess the positive way of looking it is that they’ve created a VirtualBox-type Linux VM with all the file-system mapping pre-configured.

It’s telling that the workflow that Scott is proposing is to use Visual Studio Code with a plugin for remote development.

Whatever. It’s a hard pass for me, dawg. If I needed this, I’d just install VirtualBox, and be explicit about what I’m doing.

As a side note, I’ve been using RubyInstaller for years now, on my work laptop, and it “just works.” I mean, sure, you’re limited to a specific version of Ruby, but I just make that my base, and “emerge” that one on my Mac and the Linux host server, and everything lines up. So my need for any sort of virtualized Linux environment on Windows has already been satisfied.

Making Windows Tolerable

I got a new job a couple months ago. I suspect that IT departments of monstrously-large, international corporations are all reading from the same playbook in how to setup and administrate their networks, users, applications, and computers. The IT overhead was pretty overbearing at the previous place, and the only changes at the new place are purely cosmetic. (I hear of places which are worse than both of them, so it can be worse.)

Perfect example: the wifi is locked down, just the same, in both places. I don’t know how they do this. It must be either certificate-based authentication, or RADIUS. The end result is that you simply cannot put a personal device on the wifi network. If a customer were to demand it, they can make an exception, but for only a week. I guess that’s better than the old place, which only gave out single-day exceptions, but both organizations are demonstrating a cutting-off-you-nose-to-spite-your-face approach to the problem. As before, I can plug a computer into the wired network, and carry on just fine, thank you very much, so what did the policy do for them or for me? The answer is: inconvenience us both. So, first tip, for free, is:

Get a cellular plan with a provider which has good coverage at your office

I switched from AT&T to Verizon, because AT&T coverage around Columbus is famously bad, and AT&T has been telling people for a decade that they are going to put up more towers, but they never do.

Next? Proxies. OMG, proxies. What gives? The old place had a single proxy everything had to go through, and it needed authentication via the domain credentials. If you didn’t use it, or didn’t authenticate, you weren’t getting to the internet. Period. The new place has a world-wide conglomeration of about 20 proxies, depending on office location, and you get passed between them depending on what you need to get to. And they, too, need authentication via domain credentials. However, unlike before, these proxies can just be bypassed! If you use one of the proxies, you can’t reach about half the internet, like YouTube or Reddit, but if you simply do not configure your connection to use a proxy, you can get to everything just fine! And faster! So, second tip, to make Windows usable, in this situation is:

Use Firefox as your main browser, and install the FoxyProxy plugin

I just configure the plugin to use the local proxy to get to the couple of corporate machines I actually need to access, and it all works out great. I had to do this sort of thing at a different previous company, so I was prepared for this particular annoyance.

Next: Working with Linux. For many years, I’ve watched Windows Services for Linux take shape, and was secretly hopeful about it, even despite my general distrust and dislike for Microsoft and Windows. After it came out, I tried using it to develop with Ruby on Rails. It failed in about 3 different ways before I gave up. I’ve continued to try it, and it continues to fail in obscure ways because it’s not, in fact, “real” Linux, no matter what the paid advocates say (nor how cool they may be). So, third tip, to develop with practical web application stacks:

Avoid WSL, and keep using VirtualBox

The second half of this tip is, of course, what to do about a terminal and SSH. I thought I had it figured out at the previous company with Cmder and PuTTY. However, at this new company, people use MobaXterm, and OMG how have I not found this before? It’s seriously great. So, third tip, part deux:

Use MobaXterm

Windows 10. Ug. I’m actually glad that Microsoft is… Microsoft, at this point, and allows companies to do unspeakable things to the registry and policies on the system that they will not expose to plebeian end users. Corporations have reined in the worst of the Windows 10 abuses. At least the playbook that big companies are using includes things like preventing the installation of game demos and requiring centralized approval of updates, which prevents a lot of day-1 update fiascos.

Unfortunately, at the end of the day, Windows is still Windows, and you still have to use it all day long. One thing I really have come to despise is the Windows Explorer. As time goes on, it becomes a bigger and bigger sore point to me, because it’s so jarring after using Apple’s Finder all day long. About 15 years ago, a coworker introduced me to Directory Opus. It’s not cheap, but it’s an incredible replacement for the native application. I’ve bitten the bullet, and bought it again. Fourth!

Buy Directory Opus

Seriously. Just spend the money.

The rest is a laundry list:

  • Use RubyInstaller to do Rails development. Everything else is broken.
  • Buy Sublime Text 3.
  • Install the Droid Sans Mono font. Other fonts may look a little nicer for coding and terminal work, but it works really well with the Windows anti-aliasing hinting system.
  • Buy Tower for a git client. You could use Sourcetree, which is free, but Tower is waaay faster.
  • Avoid the use of Skype wherever and whenever possible. It was great before Microsoft bought it, and now it’s just a “corporatized” trash fire. At least we get to save conversations at this company!
  • Go ahead and use OneNote, but please do not share the notebooks with your team. That way lies madness.