Build), I get the following error in the console ...">

Error creating Ruby in Sublime Text Editor

puts "Hello World!" 

When I press CTRL + B (Tools-> Build), I get the following error in the console

[Errno 2] There is no such file or directory [cmd: [And '~ / .rvm / bin / RVM-auto-ruby', u '/home/ubuntu/rails_projects/Ruby/c2f.rb']] [dir: / home / ubuntu / rails _projects / Ruby] [path: / USR / Library / LightDM / LightDM: / USR / local / SBIN: / USR / local / bin: / USR / SBIN: / USR / bin: / SBIN: / bin : / Usr / games] [Finished]

Below is the Ruby.sublime-build

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

I run this on Ubuntu 12.04, Sublime Text 2.0.1

~ / .rvm / bin / rvm-auto-ruby -v ruby ​​1.9.3p194 (patch 2012-04-20 35410) [i686-linux]

What am I missing? I also installed Ruby Test and am working.

+4
source share
1 answer

The problem is ~ in your path to Ruby. This may not be very general, but try to change

 "cmd": ["~/.rvm/bin/rvm-auto-ruby", "$file"] 

with

 "cmd": ["/home/your_username/.rvm/bin/rvm-auto-ruby", "$file"] 
+7
source

Source: https://habr.com/ru/post/1432856/


All Articles