If i follow directions on this link, i will be prompted with a popup from File -> Create Launcher Script: 'You can create a luancher script to enable opening files and projects in RubyMine from the command line. Please specify the name of the script and the path where it should be created: Name: mine Path: /usr/local/bin
I click 'Ok" button, only to get the following message: Failed to create launcher script: /private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher_installer2105549247998412832: line 1: mkdir: command not found
/private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher_installer2105549247998412832: line 2: install: command not found
i do indeed have the file: /private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher133180980848788216
thinkin' me smart, me execute: sudo install -g 0 -o 0 /private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher133180980848788216 /usr/local/mine
Failed to create launcher script: /private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher_installer2105549247998412832: line 1: mkdir: command not found
/private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher_installer2105549247998412832: line 2: install: command not found
RubyMine should ask for root privileges (using native OS dialog) before script execution
thinkin' me smart, me execute: sudo install -g 0 -o 0 /private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher133180980848788216 /usr/local/mine
no nutting..
RubyMine dynamically generates script body in tmp file and then deletes it from tmp. Thus most likely "launcher133180980848788216" was already deleted
My mine script for Mac OS:
romeo@iromeo ~$ which mine
/usr/local/bin/mine
romeo@iromeo ~$ more `which mine`
#!/usr/bin/python
import socket
import struct
import sys
import os
import os.path
import time
# see com.intelij.idea.SocketLock for the server side of this interface
RUN_PATH = '/Applications/idea/RubyMine-102.137.app/Contents/MacOS/rubymine'
CONFIG_PATH = '/Users/romeo/Library/Preferences/RubyMine31'
args = []
skip_next = False
for arg in sys.argv[1:]:
if arg == '-l' or arg == '--line':
args.append(arg)
skip_next = True
elif skip_next:
args.append(arg)
skip_next = False
else:
args.append(os.path.abspath(arg))
def launch_with_port(port):
found = False
s = socket.socket()
s.settimeout(0.3)
try:
s.connect(('127.0.0.1', port))
except:
return False
while True:
try:
path_len = struct.unpack(">h", s.recv(2))[0]
path = s.recv(path_len)
path = os.path.abspath(path)
if os.path.abspath(path) == os.path.abspath(CONFIG_PATH):
found = True
break
except:
break
if found:
if args:
cmd = "activate " + "\0".join(args)
encoded = struct.pack(">h", len(cmd)) + cmd
s.send(encoded)
time.sleep(0.5) # don't close socket immediately
return True
return False
port = -1
try:
f = open(os.path.join(CONFIG_PATH, 'port'))
port = int(f.read())
except Exception, e:
print e
port = -1
if port == -1:
# SocketLock actually allows up to 50 ports, but the checking takes too long
for port in range(6942, 6942+10):
if launch_with_port(port): exit()
else:
if launch_with_port(port): exit()
bin_dir, bin_file = os.path.split(RUN_PATH)
os.chdir(bin_dir)
os.execv(bin_file, [bin_file] + args)
Hello Dominic,
Please refer to the following documentation page on enabling command line tool: http://www.jetbrains.com/ruby/webhelp/initial-setup.html
Regards,
Oleg
Ack, no luck : (
If i follow directions on this link, i will be prompted with a popup from File -> Create Launcher Script:
'You can create a luancher script to enable opening files and projects in RubyMine from the command line. Please specify the name of the script and the path where it should be created:
Name: mine
Path: /usr/local/bin
I click 'Ok" button, only to get the following message:
Failed to create launcher script: /private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher_installer2105549247998412832: line 1: mkdir: command not found
/private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher_installer2105549247998412832: line 2: install: command not found
i do indeed have the file:
/private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher133180980848788216
thinkin' me smart, me execute:
sudo install -g 0 -o 0 /private/var/folders/uN/uNjIa4OvE5qPCPQduSZrvE+++TM/-Tmp-/launcher133180980848788216 /usr/local/mine
no nutting..
:* (
Which is your OS?
RubyMine should ask for root privileges (using native OS dialog) before script execution
RubyMine dynamically generates script body in tmp file and then deletes it from tmp. Thus most likely "launcher133180980848788216" was already deleted
My mine script for Mac OS: