Skip to content
Josh Cheek edited this page Jan 8, 2017 · 4 revisions

Requirements

Ruby >= 2.1 (though there's apparently at least one person using it with 2.0.0).

First try this

Install it with Rubygems:

$ gem install seeing_is_believing

Verify it installed correctly by checking that you can run it:

$ seeing_is_believing -e '1 + 1'
1 + 1  # => 2

If you didn't have Ruby installed

For Windows users, you can install Ruby with RubyInstaller.

For Mac / Linux / Unix users, if you're doing Ruby development, you'll probably want some sort of ruby version management. The three most popular options are rvm, rbenv, and chruby. I've used all three fairly seriously and have been happiest with chruby.

Alternatively, you may be able to install it through your package manager. This will probably install it globally, so you may hit the next issue as well.

If you didn't have permission to install it

This implies you're using a global installation of Ruby (ie it's available to all users on your computer and so you don't have permission to add things that could change the way it works for other users). This typically occurs because you're using a default installation (eg Mac OSX ships with a Ruby), but it can also happen if you install through a package manager or if you use sudo when installing, which makes you the computer's root user.

You can install it locally (see the above section on how to install), or you can just tell Ruby that when you install gems to put them someplace that you do have permission to write to. To do this, you only need to set your GEM_HOME environment variable. An environment variable is just a name/value that are available to programs that you run from your current program (eg from your shell or your editor). In bash (the default shell on most systems that aren't Windows) you can set it like this: export GEM_HOME="$HOME/.gems" and then try installing it again. I chose ".gems" because files beginning with a dot are not displayed by default, this prevents your home directory from feeling spammy. Note that if you take this approach, the variable will not be set in other programs (eg other shells and your editor). To set it in your shell, put it in your shell's configuration file. To set it in your editor, check your editor's integration.

What now?

You'll want to do one of these: