Sublime Text 3 and Rspec, build error

I just installed Sublime Text 3 and several packages with it.

I am making Ruby material and currently want to create my program inside Sublime Text.

But when I hit Cmb + b to create it, I have few errors in the Sublime Text console:

> [Errno 2] No such file or directory: 'rspec'
[cmd: ['rspec', '-I /Applications/MAMP/htdocs/Dropbox/pragmatic-ruby', '/Applications/MAMP/htdocs/Dropbox/pragmatic-ruby/studio_game.rb']]
[dir: /Applications/MAMP/htdocs/Dropbox/pragmatic-ruby]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

Sometimes I also get:

Could not find 'rspec-core' (>= 0) among 39 total gem(s) (Gem::LoadError)
+4
source share
4 answers

He seems to be unable to find a team rspec. Try installing rspecfrom your terminal -

gem install rspec      # for rspec-core, rspec-expectations, rspec-mocks
gem install rspec-core # for rspec-core only
+1
source

Rspec package includes its own build system

{
    "cmd": ["rspec", "-I ${file_path}", "$file"],
    "file_regex": "# ([A-Za-z:0-9_./ ]+rb):([0-9]+)",
    "working_dir": "${project_path:${folder:${file_path}}}",
    "selector": "source.ruby",

    "windows":
    {
            "cmd": ["rspec.bat", "-I ${file_path}", "$file"]
    }
}

Tools- > BuildSystem , Ruby. , BuildSystem

0

: https://github.com/SublimeText/RSpec/issues/50#issuecomment-64077090

build - , Sublime , .

[Sublime]/Packages/User/RSpec/RSpec.sublime-build .

, !

0

. Build System Ruby, .

> > Ruby

0

All Articles