简体   繁体   中英

Building Ruby from Sublime text 3

My OS: Linux mint.

I installed Ruby using RVM by following a guide from internet. I can now run ruby from terminal.

ruby -v : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]

and

which ruby:/home/shabin/.rvm/rubies/ruby-2.3.0/bin/ruby

After that installed sublime text 3. Now when i run a ruby build from sublime 3 (Using Ctrl-B), i get below error.

/bin/bash: ruby: command not found
[Finished in 0.0s with exit code 127]
[shell_cmd: ruby "/home/shabin/LRTHW/ex1.rb"]
[dir: /home/shabin/LRTHW]
[path: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/jvm/java-7-oracle/bin:/usr/lib/jvm/java-7-oracle/db/bin:/usr/lib/jvm/java-7-oracle/jre/bin:/home/shabin/.rvm/bin]

I followed this question:

Error Building Ruby in Sublime Text Editor

and numerous other sites. By Ruby.sublime-build file is:

{
  "env":{
    "PATH":"/home/shabin/.rvm/bin:${PATH}"
  },
  "cmd": ["rvm-auto-ruby", "$file"],
  "file_regex": "^(...*?):([0-9]*):?([0-9]*)",
  "selector": "source.ruby"

Any pointers?

Are you using the correct build system? "Tools > Build System > Ruby"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM