'Opening ruby app from Rubymine terminal
I just got Rubymine and getting used to ruby on rails on mac , Im wondering if there is any command to open a ruby app on Rubymine 7 , from terminal
would there be a command like
$ Rubymine /Path/to/RubyApp
Thanks
Solution 1:[1]
The standard way to do it on bash/OSX from the JetBrains site:
$<RubyMine> <path1> --line<number> <path2>
That's the launcher, the path to the project, the line you want the file to open to and the path to the file in order. An example would be: /Applications/RubyMine.app/Contents/MacOS/rubymine ~/RubyMineProjects/untitled45 --line 1 ~/RubyMineProjects/untitled45/sample.sass
These can be pretty long commands, but you can create a symlink to shorten the launcher at least.
Keep in mind that launching from the command line launches with the ruby version you have set there as well as any other command line configs. If you want to keep configurations from the editor you should open the project the conventional way.
Solution 2:[2]
RubyMine has a special menu item for that. In ver. 8, 'Tools' > 'Create command-line launcher ...' Previous versions should keep the item somewhere around.
Solution 3:[3]
Once you've created command-line launcher (Tools > Create Command-Line Launcher), you can use the command mine
via the command line..
e.g. If you have navigated to a folder via the command line, that you then want to open with Rubymine, you can run mine .
Solution 4:[4]
it's enough to append the following line into your ~/.bashrc
or ~/.zshrc
alias rubymine="open -a rubymine"
reference Use Typora from Shell or Cmd
Solution 5:[5]
For RubyMine 2017.1.5, just type Alt + F12 for local terminal
Solution 6:[6]
Just go to folder where Rubymine is download.Then go to Rubymine bin folder. And run command from console. In my case
kashif@kashif-HP-ProBook-4520s:~/Downloads/RubyMine-2017.1.6/bin$ ./rubymine.sh
Solution 7:[7]
Previous answers didn't help me (using RubyMine 2020.1)
Instructions for Mac (different OSs also described on rubymine docs):
- Create a script:
You can create a shell script with this command in a directory from your PATH environment variable. For example, create the file
/usr/local/bin/rubymine
with the following contents:
#!/bin/sh
open -na "RubyMine.app" --args "$@"
- Tada! Assuming that script is executable (in case not - run
chmod +x /usr/local/bin/rubymine
) Now you are able to navigate to proper directory and runrubymine .
to run RubyMine for that directory
If you want to play around with different args passed while starting RubyMine, check rubymine docs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | BarFooBar |
Solution 2 | user3734466 |
Solution 3 | JennaR |
Solution 4 | TorvaldsDB |
Solution 5 | SᴀᴠOnᴇᴌᴀ |
Solution 6 | Kashiftufail |
Solution 7 |