gem install seeing_is_believing
To Install an Atom package, open the "Atom" menu in the top left and select "Preferences".
Within your Atom Preferences, look for the "Install" tab in the vertical menu on the left hand side.
Select the "Install" tab and use its search bar to search for "seeing-is-believing". Your first result should be the seeing-is-believing package by Josh Cheek. Install it by clicking the blue "install" button within the package item.
Note Make sure you aren't searching for the package within the "Packages" tab -- this only lists your existing packages, not new ones available for install.
Finally we need to make sure Atom knows how to properly use
ruby on our system and utilize the seeing_is_believing
gem
we installed.
Unfortunately the proliferation of various ruby version managers makes this step a bit complicated, and the steps will vary depending which one you are using. Follow the steps below for your version manager.
Step 1 - Create an RVM "Wrapper"
Run this command in terminal: rvm list strings
and note the line
which corresponds to the version of ruby you're using.
For example when we ran this we got:
ruby-2.0.0-p643
ruby-2.2.1
We're currently using 2.2.1, so we will use that line to create an RVM wrapper. This is done by running the following command:
rvm wrapper ruby-2.2.1 sib
Where ruby-2.2.1
would be replaced by whatever ruby version you
are using.
Step 2 - Configure Atom to use the wrapper
Next, we need to get the full path to the wrapper we just created. We can get this by running:
which sib_ruby
It will be helpful to copy this to your clipboard, since we'll use it in the next step.
Now open your atom config in your editor (probably atom). It
lives at ~/.atom/config.cson
, so we can open it by running:
atom ~/.atom/config.cson
Finally, we need to add a new entry to this config for seeing is believing. The section we'll add looks like:
'seeing-is-believing':
'ruby-command': 'path/to/your/ruby'
Where path/to/your/ruby
is the output of running which sib_ruby
from the previous step.
For example, ours looks like:
'seeing-is-believing':
'ruby-command': '/Users/aarongreenspan/.rvm/bin/sib_ruby'
Finally, keep in mind that this entry should be nested beneath
your global config (usually marked with "*"
or "global"
)
For example, our final config once we added the SIB lines looks like:
"*":
"exception-reporting":
userId: "23d5b71f-332d-7db7-1cb6-3cca62b22535"
welcome:
showOnStartup: false
core: {}
editor:
invisibles: {}
fontSize: 15
'seeing-is-believing':
'ruby-command': '/Users/aarongreenspan/.rvm/bin/sib_ruby'
Run this command on your terminal:
which ruby
Copy the filepath that it outputs, and insert that into
your atom config file (~/.atom/config.cson
), following the
following template:
"*":
"exception-reporting":
userId: "23d5b71f-332d-7db7-1cb6-3cca62b22535"
welcome:
showOnStartup: false
core: {}
editor:
invisibles: {}
fontSize: 15
'seeing-is-believing':
'ruby-command': '/path/to/your/ruby'
Where /path/to/your/ruby
is replaced with the output from the
step before.
Note that you should only have to add the last 2 lines -- the other lines may be different in your config and just serve as an example of what the file might look like.
I added the instructions for rbenv. Just copy the raw from my fork!
@worace