Skip to content

Instantly share code, notes, and snippets.

@bazbt3
Created December 2, 2016 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bazbt3/94ba7fadec60d725d7cf8a674c0e22f4 to your computer and use it in GitHub Desktop.
Save bazbt3/94ba7fadec60d725d7cf8a674c0e22f4 to your computer and use it in GitHub Desktop.
Ruby environment managers suck

A few days ago the Felix iOS app's push server finally went dark, so I decided I needed to really accelerate my computing hobby. There's no way I'll ever be able to produce as polished an app as Felix was, but I have urges which have lain dormant for 30 years. Or are they itches?

The time was right to install a command line client for App.net on my venerable Lappy486. Maybe an odd choice for a first step given the above? I've attempted to rationalise it by guessing the command line gets me closer to the action than a swipe or a tap - may help me understand an app's 'mechanics' more.

As far as I know there are 2 clients available:

  1. Ayadn by ADN's @ericd - at http://www.ayadn-app.net/
  2. Texapp by ADN's @doctorlinguist (Floodgap Software) - at http://www.floodgap.com/software/texapp/ - incidentally the maintainer of the very excellent TenFourFox browser for older Macs - at http://www.floodgap.com/software/tenfourfox/

I make the decision to install Ayadn because it looks the prettiest, the installation instructions look easiest to follow, and the command syntax looks easiest to use. This isn't a criticism of Texapp's approach - I realise that what I want to do is very much a niche thing even within the App.net ecosystem - Ayadn's install just looks easier.

Yeah, about that promise. There's a prerequisite with a certain degree of difficulty: Linux (or a similar UNIX-like OS, e.g. Apple OS X) is required.

Right, I need to install Linux (or a similar UNIX-like OS, e.g. Apple OS X) alongside Windows 7. Easy. And, do you know, it is.

Or rather it is the second time it's done.

The first attempt to install Ayadn fails, impenetrably at every step, so I decide to over-write the newly-created partition devoted to Ubuntu 14.04 LTS with a fresh install of Ubuntu 14.04 LTS. I use the word 'impenetrably' simply because at my level of knowledge the error messages, though undoubtedly useful to someone with more Linux skills than mine, fail to convey what was failing and why. And without enough clarity to help me fix it.

After Ubuntu sets itself up and a user account is created a quick trip to Ayadn's installation documentation - at https://github.com/ericdke/na/blob/master/doc/02-install.md - is called for. There is one prerequisite - Ruby.

I take a clue from the page and look on the web for Ruby for Ubuntu - and then install it. Yes, of course it fails to allow Ayadn to install. Now what?  Follow the bloody instructions on Eric's page, that's what!

I search for RVM and find instructions - at http://rvm.io/rvm/install

Choices! Here's the one I choose, simply due to the prefix 'stable' and the word 'ruby'.

Install RVM stable with ruby:

$ \curl -sSL https://get.rvm.io | bash -s stable --ruby

There's one prerequisite to a successful install of RVM: a thing called 'curl'. I install that after following the instructions given by the RVM installer.

Yes, my RVM install again fails a couple of times towards the end of the script run, needing a repeat of that command a couple of lines up.  I persevere. It takes quite a while to install, with the pleasant bonus of a status |/-| indicator!

And then it finishes. And then I'm able to type something:

'gem install ayadn'

It works! So I type:

$ ayadn help post

[enter]

I read, and then type:

$ ayadn post 'Woohoo! Thanks @ericd!'

[enter]

[ctrl-D]

(Something like that anyway.)

Phew, success!

But no.

Day 2 arrives and with it an inability to start Ayadn after boot. I reinstall RVM, Ruby, and then try to reinstall Ayadn. I read some slightly less impenetrable error messages, e.g. after attempting 'gem install ayadn', this:

'ERROR: While executing gem ... (Errno::EACCESS)'

'Permission denied - /var/libs/gems'.

Eventually though, it works. Things seem to be going well until I get clever and attempt to run Ayadn in 2 Terminal windows - one with the command list and one to execute them. @ericd helps me with a bit of background so I install RBENV and then the latest stable Ruby.

The commands still fail in the second window.

I actually fix it! (No Googling here, I must add!) I edit the Ubuntu Terminal's Default profile (see the Title & Command tab) ticking the 'Run command as a login shell' box. It works. I can have multiple Terminal windows open doing different Ayadn tasks.

ADN's @0xmf has mentioned a thing called 'tmux' a few times recently. I suspect it could be useful if I had more brain cells and either the time or a need to learn more commands.

Suspecting this isn't over, I installed Sublime Text 3 and gave up for the day.


Disclaimer: Some sequences have been shortened. The value of this promotion may go down as well as up. Your experience may not attain optimal status. Unicorns shown for illustration only. >
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment