JoshCheek / seeing_is_believing

Displays the results of every line of code in your file
1.31k stars 54 forks source link

ruby: No such file or directory -- seeing_is_believing (LoadError) #43

Closed mmahalwy closed 9 years ago

mmahalwy commented 10 years ago

When I evaluate, everything disappears

When I do 'Remove Annotations' it returns error: ruby: No such file or directory -- seeing_is_believing (LoadError)

Using Sublime Text 3 - should note that 'Preferences > Package Settings' does not show SeeingIsBelieving although in my package command palate it's there.

My settings:

{
  // the command to run your ruby, again this is setup for rbenv
  // if you've installed Ruby without any managers, this would just be "ruby"
  "ruby_command": "/Users/mmahalwy/.rvm/bin/sublime_ruby",

  // environment variables to set before running
  "environment_variables": {
    // for bootstrapping rbenv
    // if you manage your versions differently, you'll have to figure out how your manager works
    // "RBENV_VERSION": "2.0.0-p0"
  },

  // get a list of all these options and what they do by going to the console
  // and typing `seeing_is_believing --help`
  "flags": {

    // max length of the entire line (only truncates results, not source lines)
    "--line-length": 500,

    // select the alignment strategy:
    // file  (DEFAULT) =>  the entire file is at the same alignment
    // chunk           =>  each chunk of code is at the same alignment
    // line            =>  each line is at its own alignment
    "--alignment-strategy": "chunk",

    // timeout limit in seconds when evaluating source file (ex. -t 0.3 or -t 3)
    // omit for no timeout (warning, can freeze your editor up if you have an infinite loop)
    "--timeout": 12,

    // sets file encoding, equivalent to Ruby's -Kx (see `man ruby` for valid values)
    "--encoding": "u"
  }
}
JoshCheek commented 10 years ago

In sublime, you can do cmd+` to see the console, which should log errors. This will give you a better idea what's going wrong.


But, here's some troubleshooting things you can do:

Make sure your ruby is set up comrrectly:

$ /Users/mmahalwy/.rvm/bin/sublime_ruby --version

Make sure you have SiB installed in that Ruby:

$ /Users/mmahalwy/.rvm/bin/sublime_ruby -S gem list seeing

*** LOCAL GEMS ***

seeing_is_believing (2.1.4)

If it doesn't have it installed, install it.

$ /Users/mmahalwy/.rvm/bin/sublime_ruby -S gem install seeing_is_believing

If it does have it installed, make sure everything is working correctly:

$ /Users/mmahalwy/.rvm/bin/sublime_ruby -S seeing_is_believing --version
2.1.4

$ /Users/mmahalwy/.rvm/bin/sublime_ruby -S seeing_is_believing -e '1+1'
1+1  # => 2

If not, troubleshoot that, if so, let me know and I'll try to think of more things.

JoshCheek commented 9 years ago

Closing, b/c I'm assuming you got this figured out, given #45