-
RubyGems SSL Error with jRuby
I spent several days investigating an error that was coming up with our Rails application build using jRuby v9.3.3 - v9.3.10. Everytime the build would try to run
bundle install
we would get the following error.Fetching source index from https://rubygems.org/ Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <Unrecognized SSL message, plaintext connection? (https://rubygems.org/specs.4.8.gz)> Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <Unrecognized SSL message, plaintext connection? (https://rubygems.org/specs.4.8.gz)> Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <Unrecognized SSL message, plaintext connection? (https://rubygems.org/specs.4.8.gz)> Could not fetch specs from https://rubygems.org/ due to underlying error <Unrecognized SSL message, plaintext connection? (https://rubygems.org/specs.4.8.gz)> ERROR: bundle install failed
You will notice it attempts 3 times, this is because the script is actually running:
bundle install --local --retry 3 || { echo "WARNING: bundle install --local failed, running bundle install"; bundle install --retry 3 || { echo "ERROR: bundle install failed"; exit 1; } }
When we would run our script from the command line, it would work just fine. When we would try to run it from our Bamboo application (used for Continuous Integration), it would fail with the above errors.
We’re using RVM to manage the different Ruby versions needed by our applications on the Bamboo server. We thought it might be an issue with Bundler, but it turned out that one of our JAVA configurations was causing this issue.
We noticed that
JAVA_OPTS
was not set when our admin ran the build scripts from the command line, but with the Bamboo job it was set, and it included the-Djava.security.properties
option pointing to a file that used the following:jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, \ EC keySize < 224, 3DES_EDE_CBC, anon, NULL, RSASSA-PSS
When we added this to the export for JAVA_OPTS, the issue occurred when running the build scripts, or when running the RubyGems troubleshooting script (
curl -sL https://git.io/vQhWq | ruby
). When we removed it, the error returned.
-
Long time nuclear waste warning messages
I wanted to apply the robotic voice synthesis to Long-time nuclear waste warning messages.
say -v fred "This place is a message" say -v fred "and part of a system of messages" say -v fred "pay attention to it\!" say -v fred "Sending this message was important to us." say -v fred "We considered ourselves to be a powerful culture." say -v fred "This place is not a place of honor." say -v fred "no highly esteemed deed is commemorated here." say -v fred "nothing valued is here." say -v fred "What is here was dangerous and repulsive to us." say -v fred "This message is a warning about danger." say -v fred "The danger is in a particular location." say -v fred "it increases towards a center." say -v fred "the center of danger is here." say -v fred "of a particular size and shape, and below us." say -v fred "The danger is still present, in your time, as it was in ours." say -v fred "The danger is to the body, and it can kill." say -v fred "The form of the danger is an emanation of energy." say -v fred "The danger is unleashed only if you substantially disturb this place physically." say -v fred "This place is best shunned and left uninhabited."
See also Warning messages for future humans
-
Updating RBEnv on Raspberry Pi
Here’s a modified version of instructions provided by Yosei Ito. I used
apt remove
instead ofapt uninstall
.sudo apt remove ruby-build $ mkdir -p "$(rbenv root)"/plugins $ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
This worked very well for me, helping me to install Ruby 2.7.3, and install the gem dependencies for this website without any errors or need for using ‘sudo’ when installing gems via Bundler.
-
Generating a New Rails Project
The great thing about working with a framework like Ruby on Rails is how you can pick and choose the components that make up your application. Developers often have preferences concerning solutions or tools they use in their projects. They have the choice of testing tools such as Rspec or Cucumber, testing factory libraries such as FactoryBot or Fabrication, authentication solutions such as Devise or AuthLogic, and authorization solutions such as CanCan or Pundit.
It can feel heavy having to reconfigure a freshly generated Rails application to use these different components, because you spend most of your time configuring the new application rather than jumping into actually building the functionality.
-
How to Insert Special Entities in React
Generating Characters
You can generate UTF-16 characters in ES6 using String.fromCharCode(), which takes one or more UTF-16 codes as input and returns the unicode character(s) specified.
// hex code input let copyright = String.fromCodePoint(0x00A9); // "©" // decimal code input let copyright = String.fromCodePoint(0169); // "©"
-
A New Solution for Personal and Small Business Websites
Static Website Beginnings
I’ve maintained my own personal blog, and maintained websites for small businesses, since 2000. I started building websites by manually coding the files in HTML, and creating images I crafted in Photoshop. I’d update the website by uploading the files to the web hosting server using FTP. I later expanded on this by learning CSS and JavaScript. For the longest time I used Macromedia Dreamweaver (now owned by Adobe), because it was the closest thing to a web-standard compliant WYSIWYG editor, with a text/code editor that supported code coloring.
-
VueJS - Built-In & Reserved Tags
I’m working on an app that is meant to present a list of “steps” along a certain “path”. I tried to create a component called “path”, but this wasn’t allowed.
I got this error in the console.
vue.runtime.esm.js:638 [Vue warn]: Do not use built-in or reserved HTML elements as component id: path
-
Updating Vue-Loader to v15 with Webpacker
I recently decided to jump into working with VueJS again within the context of a project I’m working on that uses Rails 5 with Webpacker.
I upgraded Webpacker from v3.6 to v4.2.2, Vue from v2.5.16 to v2.6.11, and Vue-Loader from v14.2.2 to v15.9.0.
After making this update I got the following error:
ERROR in ./app/javascript/my_pack/components/App.vue Module Error (from ./node_modules/vue-loader/lib/index.js): vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config. Error: vue-loader was used without the corresponding plugin. Make sure to include VueLoaderPlugin in your webpack config. at Object.module.exports (/Users/jason/Projects/my_app/node_modules/vue-loader/lib/index.js:36:29)
-
Fixing audio for Steam (Rust) on Mac OS X Mojave
Recently I bought a new Macbook Pro running Mojave. I found myself unable to get the microphone to work for the in-game voice chat using the ‘v’ key.
The closest solution I could find was mentioned in this article:
This article was oriented towards League of Legends, so I had to modify the commands used to enable this for steam.
-
Fixing file and directory permissions recursively
Often I find myself downloading ZIP files, and after unarchiving them all the files have totally incorrect permissions such as 777 for all files and folders.
Go into the directory main directory at the top of the file/folder hierarchy and run the following commands to resolve this: