Home Download Buy Blog Forum Support

How do I run a Ruby Gem via the Sublime Text 2 Build System?

How do I run a Ruby Gem via the Sublime Text 2 Build System?

Postby rafalchmiel on Sun Apr 14, 2013 6:21 pm

I've tried different settings like simply:
Code: Select all
    {
      "cmd": "rubocop '$file_name'"
    }

I've also tried setting the path, etc:
Code: Select all
    {
      "cmd": "rubocop '$file_name'",
      "path": "~/.rvm/bin",
      "selector": "source.rb",
      "working_dir":"$project_path"
    }

For both I get an error message along the lines of:
Code: Select all
    [Errno 2] No such file or directory
    [cmd:  rubocop 'configurer.rb']
    [dir:  /home/rafal/Documents/Projects/configurer]
    [path: /usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games]
    [Finished]

and:
Code: Select all
    [Errno 2] No such file or directory
    [cmd:  rubocop 'configurer.rb']
    [dir:  /home/rafal/Documents/Projects/configurer]
    [path: ~/.rvm/bin]
    [Finished]

respectively. I have followed some of the tutorials I've found online as well as some of the answers at StackOverflow but no luck. Any ideas on why this is happening? What is the correct and working way of running a Ruby Gem upon a currently open file? The Gem Rubocop (https://github.com/bbatsov/rubocop) is definitely installed.
rafalchmiel
 
Posts: 1
Joined: Sat Apr 13, 2013 8:41 pm

Return to General Discussion

Who is online

Users browsing this forum: giltig, observingly, prmaple and 35 guests