chruby on macOS
i am confident i am doing this the wrong way. but in short: it seems like i need a ruby provided by brew
in order to run vim on my mac. if i uninstall the brew
ruby in favor of one of my chruby rubies, i get a message like this:
dyld: Library not loaded: /usr/local/opt/ruby/lib/libruby.2.5.0.dylib
Referenced from: /usr/local/bin/vim
Reason: image not found
Trace/BPT trap: 5
so, i’m caving and keeping a version of ruby 2.5.x installed via brew
, then using chruby for everything else. this is hopefully a temporary solution.
unfortunately, this means i have to go apeshit on my shell’s path so that my chruby rubies are always used by default for everything else. i ended up adding this to the beginning of my path:
PATH=$RUBY_ROOT/bin
it feels gross?
Old Rubies on Arch Linux
In order to install some old pre-Rails 4.2 software, I needed to install an older version of Ruby. Generally, I use chruby to manage multiple Rubies on my system.
I settled on installing Ruby 2.3.6. But building it failed because my version of GCC was too new. After looking at some similar issues, it seemed like what I needed was GCC 5.x. Which, unfortunately, also was failing to build from the AUR.
In the end:
- I found a GCC 5.5 binary and installed it with Pacman. (
pacman -U gcc-5.5.pkg.tar.xz
.)
- I ran
ruby-install
with some special environment variables, which I’ll outline below.
- I opened a new terminal and
chruby ruby-2.3.6
. And everything worked.
Here is the ruby-install
command I had to run:
CC=gcc-5 PKG_CONFIG_PATH=/usr/lib/openssl-1.0/pkgconfig RUBY_EXTRA_CONFIG_OPTIONS="--with-openssel-dir=/usr/lib/openssl1-1.0" ruby-install ruby-2.3.6
Oh my dotfiles
I have discovered that I have a new problem though. Which is that macOS terminals and Linux terminals don’t always work the same way. Now that I’ve changed to base16 terminal colorseverything sucks on my MacBook.
Years-later update
Years-later update: I’ve been working with Linux a lot. I’ve been learning Ruby and Ruby on Rails most recently. I love the shell. GUIs don’t ever feel right. And right now the web is a really horrible place that makes too many assumptions about who I am and who I should be.
Maybe this is a place I can talk about code and trash I am learning in my trademarked, I-write-poems-and-care-too-much-about-stylism sort of way.
This post is ugly.
A lot has happened since my last post, but most of it isn’t Unix-related. My site is now up and semi-public and it looks okay as far as I’m concerned—but I didn’t end up making use of that contact form I set up. (I heard some bad things about PHP-powered contact forms re: security, and I’m not sure how wild and formy I want a contact form to be anymore. mailto:
will do for now.)
I’ve made a couple other sites in Grav, and they’ve added a new admin plugin and some other cool stuff that makes me excited about it. I also set up a proper Vagrant machine for Grav development which will hopefully give me some better dev habits. So the next step would be changing my ways so that, for example, my local environment has settings like the debugger on by default, whereas the production site is all CSS minified, debugger off, etc. by default. This is very easy to do, but right now my git repos have the whole sites in them, which means I have to be super careful and stuff. Major pain, not productive.
Sorry for the lack of updates. <3
Some context
I’m in the middle of launching my website, benjaminwil.info, on a Digital Ocean droplet running Ubuntu Server. It’s a way of forcing me to get better at this kind of stuff, but it’s also mighty fun having complete control. The website was built using Grav and is all running properly thanks to Apache 2 I guess. I have some subdomains planned—probably one for project/client management—that will need a MySQL database. So, that will be fun to set up.
My next mini-project will be getting my contact form working and live using phpmailer()
and GMail instead of setting up a mailserver. My friend Kubilay helped me figure that out. (Thanks Kubilay.)
My first post
Hey. So my plan for this blog is to, in tilde.club fashion, document my Unix education. Since I began poking around with Arch Linux a few years ago, I’ve made some of the same mistakes over and over again, and it’s prolly time to actually learn how permissions work, etc. Okay, that’s it for tonight. Love you.