Getting My Dev Environment Set Up Again: My Day in Dependency Hell

Jess Lee - Mar 30 '17 - - Dev Community

The day before I started General Assembly's Web Development Immersive, our cohort had a mandatory ‘installfest' pizza party. Bright eyed students gathered together and opened up their terminal for the first time.

We were told to type this:

bash <(curl -sL https://raw.githubusercontent.com/GA-WDI/installfest/master/builds/mac)
Enter fullscreen mode Exit fullscreen mode

...and that was it. We weren't given much context for what was happening, but I knew it was magical because progress bars were filling up and illegible text was running through the window. If I wasn't sitting in that classroom, I would have thought my computer was getting hacked, or something scary like that. I asked one of our instructional assistants whether or not we'd be able to 'do this' after we graduated and found out later that I was known in the teacher's lounge as the girl who wanted to write bash scripts.

Over a year later, today, I'm sitting in front of a new machine and have no idea how to set up my dev environment. Git and Ruby have always, just, been there for me. I also haven't coded in a few weeks (there's a surprisingly large amount of non-coding work to do for The Practical Dev) so I'm excited and eager to rackup a server.

What I Set Up

Instead of forking a repo (there are so many good ones - like this!), I'm going to do a (mostly) manual installation and keep track of everything I need here for next time.

  • chrome
  • iTerm2
  • XCode + Git
  • atom (first time trying it! g'bye sublime.)
  • atom shell commands
  • mkdir ~/Code
  • clone dev.to repo
  • generate new ssh keys for github
  • create an alias for the dev.to directory
  • update terminal prompt to my liking (emojis were involved)
  • homebrew for easy installation of all other things
  • ruby
  • rbenv
  • postgresql

...The Pain Begins

After installing the above, I typed bundle install and crossed my fingers.

An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that gem install json -v 1.8.3 succeeds before bundling.
Enter fullscreen mode Exit fullscreen mode

Of course, gem install json -v '1.8.3' also hit an error. This led to installing libv8 and trying out a whole host of other things. Like adding if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi to my bash profile.

I'm still stuck while typing this -- and really wish I took better notes on how I fiddled around. I think the error is related to how I installed rbenv because the directories/paths are feeling off with my gemfiles. I'm supposed to be running ruby 2.3.0 with the app, but my gems are getting installed here: /usr/local/lib/ruby/gems/2.4.0/

Before noticing this, I was also getting Ruby 2.3.0 when typing in therbenv global command but seeing Ruby 2.4.0 when I typed the ruby -v command. I've since fixed this but the above gem issue is still happening.

Anyway, it's been hours and I need a caffeine boost.

☕️☕️☕️☕️☕️☕️

Fixed!

..And I'm back. And yes, it was a rbenv issue. I ended up uninstalling rbenv and removing all .rbenv files. I also did a brew uninstall ruby to be safe. This time, I made sure to brew install rbenv before ruby, and to actually follow the rbenv instructions. I realized on this go around that I didn't run the rbenv init command originally.

bundle install worked almost flawlessly -- just needed to download the rubyracer gem and append -- --with-system-v8 to install the libv8 gem.

Now assign me a ticket.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player