JoshCheek / atom-seeing-is-believing

Seeing is Believing integration for the Atom text editor.
Do What The F*ck You Want To Public License
62 stars 4 forks source link

'seeing_is_believing' could not be spawned #34

Closed lkoslov closed 7 years ago

lkoslov commented 7 years ago

Receiving this error message when I press command+option+b "'seeing_is_believing' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process."

JoshCheek commented 7 years ago

Hi! Thanks for the issue :)

SiB in Atom works like this: The package you install through Atom only tells Atom how to talk to SiB itself. So you need to have both the thing that tells Atom how to talk to SiB, and also Sib itself.

Pretty sure the error you're getting is saying that the Atom stuff is working as expected, but it can't find the SiB stuff (ie it's giving you an error message, so probably the Atom stuff is working, but the "spawned" message means that it couldn't launch the underlying SiB program that is responsible for figuring out what to do -- this code doesn't know about the editor because it's the code that every editor ultimately uses) I do it this way because it allows you to switch your Ruby version and your SiB version independently of this package.

If your system is already set up for Ruby development, the way to fix the issue is to go to your shell (probably bash, almost certainly just whatever comes up when you load your terminal) and run gem install seeing_is_believing.

If your system isn't set up for Ruby development, this will probably fail with a permissions error (like you don't have permission to install the gem). I tried to write down the set of steps you'd need to install it over at https://github.com/JoshCheek/seeing_is_believing/wiki/Installation, if that's not good enough to get it figured out, let me know (I'm only here b/c enough people were kind and got things installed for me, so if you're in that same situation, I can set aside some time to help you get your environment figured out).

lkoslov commented 7 years ago

Perfect that worked! Thank you so much

lkoslov commented 7 years ago

One more question: How do I get it so that the return values are next to the code as opposed to at the bottom of the file

JoshCheek commented 7 years ago

Perfect that worked! Thank you so much

Awesome!

One more question: How do I get it so that the return values are next to the code as opposed to at the bottom of the file

To see the value, delete the part that is printing it (eg if you have puts(name) you would change it to just be name). SiB will record the result of every line of code in your file, so it will see this value (if you're using puts right now, then it's probably showing you nil, because that's what puts returns).

name = 'seeing is believing'  # => "seeing is believing"

# if you're doing this
puts name                     # => nil

# change it to this:
name                          # => "seeing is believing"

# >> seeing is believing

The reason printed information shows up at the bottom is that you want to be able to see the things your program printed as well as each line of code.

After you get that working, try out the two other ways to run SiB, too (command+option+v to clear the annotations, command+option+n to update lines that end in # => these are useful for managing its output to show you just the things you're interested in)