Oh-My-ZHS, RVM and $PATH

path

 

Earlier today I started learning Mirth Connect and ran into a port problem: there was not much explanation from the command_line apart from that “port was taken”. Well, I started butchering RVM and realized that it was complaining about some mysterious things, that I have never even seen before. While running `$rvm get stable` to see if I was using the `stable` version, my logs were bright red with WARNINGS and ERRORS.

`WARNING: Above files contains `PATH=` with no `$PATH` inside, this can break RVM`

It took a lot of digging around to at least find what it was all about.

I got a lot of ideas from Wynwood Tech slack channel guys and GitHub discussions, but in the end it all comes down to your specific case and how much stuff you are willing to break. A few weeks ago I would have definitely felt terrified to even come close to some hidden files on my machine, but today, I felt like it was a simple choice: I either try and dive in, or I get stuck and do nothing further. I chose the first.

————————————————————————–

What I’ve learned is that you can open any hidden files (as long as you know their little secret names, lol) through your command_line, by running

  `$vim ~/.name_of_the_file`

I am not a big fan of retro-looking vim world, so I used `atom` instead, by just substituting `vim`.

The files that everyone recommended changing were: `.bash_profile` and `.profile`.

These two, as their names read, take care of your command_line (AKA ‘bash’) profile every time you log-in. (Recommend reading more about them here. ) So, when you miss a PATH you first check those guys and add these lines of code:

.bash_profile

`export PATH=~/opt/bin:$PATH`

.profile

`export PATH="$PATH:$HOME/.rvm/bin"` # Add RVM to PATH for scripting

and then reload the files:

$source ~/.bash_profile && source ~/.profile

This should have fixed the problem… Unless, in my particular case, it did’t.

————————————————————————–

When you have tried everything and asked everybody, you feel like the only way now is to gut the whole thing, reinstall or even switch to another environment. So that was my next step: try to, maybe, change the settings of  ZHS and get away with it, because I had a suspicion, it all started happening after the latest update.

I started looking for new themes and reinstall options. And that’s when I had an idea… I couldn’t quiet understand what kind of files the ERROR was throwing in the warning. They could not be found anywhere… SO maybe they were HIDDEN!? And didn’t I just learn how to open the hidden files??  I went for it. Atom kindly opened the faulty file:

`$atom ~/.zshrc`

And here it was, just like the confusing error-log was saying, on line 56 some unfinished:

                                                                          `export PATH="`

As soon as I commented it out, things started looking better, after reloading with `source` and running `rvm get stable` for a 100-th time. Alas, it was not the end of it. Now, I was bluntly staring at this:

  `Warning: PATH set to RVM ruby but GEM_HOME and/or GEM_PATH not set`

Common! Really?

But the end was near. I just went for adding `$GEM`  in front of `_HOME`  in `.bashrc ` and `.zshrc`  files, so it looked like this:

export PATH="$PATH:$GEM_HOME/.rvm/bin"

 

I ran `source` just to be sure for all the files, then `rvm get stable` and watched the wicked RVM reload with only friendly yellow and blue colors!

 

 

 

&nbsp

Advertisements

The End Is Just The Beginning

 

Bear

 

I graduated from Wyncode Academy over a week ago.

Hello, I am a developer now!

The bootcamp ended. Ended with a river of emotion-driven tears that poured from students’ and instructor’s eyes in mesmerizing unison. The way you connect with people on a very deep level while going through long hours of learning, coding and problem solving, is unexplainable.  What makes you feel so sad on the very last day of a brain-roasting tournament, wishing it could go on for at least a little bit longer? Stockholm syndrome?

The bootcamp ended. Looking back, it makes you question a lot of things they say about life: be rational, keep walking up the straight line, take no risks… If all those people in my Cohort and all other Cohorts all over the globe followed this doctrine, there would have been no bootcamps, no new talents and no broadened horizons. There would have been no applications build in a matter of days for the PitchDay that could potentially turn into something that can make everybody’s life easier, world safe, and problems more scarce.

The bootcamp ended. I got the maximum from it: the knowledge, the mentality, the friends. If this was the end, it was a very good one.

The bootcamp ended, but everything that came out of it and was meant to happen after is just beginning.