rubycoloredglasses


I'm Jason, a web applications developer in the Denver, Colorado area.


  1. Updating RBEnv on Raspberry Pi

    Here’s a modified version of instructions provided by Yosei Ito. I used apt remove instead of apt 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.


  2. 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.


  3. 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);
    // "©"
    

  4. 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.


  5. 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
    

  6. 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)
    

  7. 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.


  8. 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:


  9. Amazon Web Services

    This article documents my exploration of Amazon Web Services (AWS).

    History

    The first service publically offered by Amazon in 2004 was Amazing Simple Queue Service (SQS), a distributed message queueing service. Message queuing helps provide communications between applications/services, with the concern or risk of requests (messages) being lost or overburdening the systems processing the messages.

    Thereafter AWS was relaunched offering Amazon Elastic Compute Cloud (EC2) and Amazon Simple Storage Service (S3).


  10. Jumpstart Guide to Ansible

    Introduction

    This guide will help you get started on using Ansible, an open-source tool you can use to automate and maintain the software and configurations of your Linux systems, as well as handle custom software deployments.

    Ansible is programmed in Python, however you do not need to know Python to use it. You may need to gain an understanding of YAML, Jinja templates, and/or read the Ansible Project Documentation.

    In this guide we use Ansible to maintain the state of your local development environment. After you are done you’ll be able to apply what you’ve learned beyond your local Linux environment.