How to open Sublime 2 in the command prompt

1,170 views
Skip to first unread message

MagiCyle

unread,
Apr 29, 2012, 10:43:06 PM4/29/12
to RailsInstaller
Hi,

I'm new to programming. I followed the Ruby Kit installation
instructions from the video on railsinstaller. I'm stumped on how to
open Sublime 2 in command prompt.

[Setup
The first task is to make a symlink to subl. Assuming you've placed
Sublime Text 2 in the Applications folder, and that you have a ~/bin
directory in your path, you can run:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/
subl" ~/bin/subl]

How do I place Sublime Text 2 in the Applications folder? Which
Applications folder?
How do I get a ~/bin directory in my path?
How do I run: ln -s "/Applications/Sublime Text 2.app/Contents/
SharedSupport/bin/subl" ~/bin/subl ?

Them, how do I run: subl --help? Type "subl --help" into the command
prompt & hit enter?

Your help is much appreciated. Thank you.

MagiCyle

unread,
Apr 29, 2012, 10:46:43 PM4/29/12
to RailsInstaller
I'm using Windows 7 64 bit

shahab amin

unread,
Apr 29, 2012, 10:58:02 PM4/29/12
to RailsInstaller
I cn't figure it out either!! so i am using redcar for the time being.

Bryan Bibat

unread,
Apr 30, 2012, 1:11:54 AM4/30/12
to railsin...@googlegroups.com
Your problem is that you're using instructions for OS X (as stated at the top of the page) and not for Windows.

When using a text editor, using the command line to launch it is optional - it just so happens that in some cases it's more convenient to do (e.g. TextMate, Redcar, gVim) and that's why some people recommend that approach.

But for the case of Sublime Text 2 for Windows, it's simply easier to just open Sublime Text (Start -> All Programs -> Sublime Text 2) and add the folder you want to the current project via Project -> Add Folder to Project...
--
Bryan Bibat
Freelance Software Engineer
http://www.bryanbibat.net

Victor Manolucci

unread,
Mar 27, 2013, 2:05:49 PM3/27/13
to railsin...@googlegroups.com
I am trying to download this for mac and having the same problem, what do I do?

Evan Machnic

unread,
Mar 27, 2013, 2:08:10 PM3/27/13
to railsin...@googlegroups.com
Hi Victor,

What's the exact issue? What steps have you already followed? Are you receiving any errors? We need more information to help diagnose.

Thanks,
Evan Machnic



Evan B. Machnic // Application Support

Engine Yard

The Leading Platform as a Service

Office: 415.994.5365

Skype: evan.ey

Twitter: @emachnic





--
You received this message because you are subscribed to the Google Groups "RailsInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to railsinstalle...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Victor Manolucci

unread,
Mar 27, 2013, 2:20:59 PM3/27/13
to railsin...@googlegroups.com
Hi Evan,
So I go to http://railsinstaller.org/ and download the Kit and follow the step by step instruction attached. Everything seems to be workng great until I get to the part where its says to download sublime, which I've been using for a few months now already so it was already installed.. next, It asks me to  "- After downloading and installing Sublime Text you'll need to install its command line functionality:
  • The first task is to make a symlink to subl. Assuming you've placed Sublime Text 2 in the Applications folder, and that you have a ~/bin directory in your path, you can run:
" So I go ahead and paste the: ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
and then nothing... I am not a programmer just a newby, and I'm stuck... I need to get this going for my first ruby class tonight and I am hoping I can get this on my mac since its impossible to make it work on my windows machine. I've been at it for 4 hours...

Any ideas?

Best,
V-

This message was sent by:
Victor Manolucci, Operations 
MANOLUCCI Handbag Factory
220 61st street, Unit 2D
West New York, NJ 07093 
Skype: Vicbysog
www.MANOLUCCI.com 

NOTICE: The Information in this Email is Confidential, Private and considered Legally privileged information. It is solely intended for the addressee(s) and no one else. The addressee(s), or anyone who intercepts this Email, is not permitted to show or discuss the contents of this Email with any person(s) without the sole written consent of Manolucci Designs, Inc. Violators will be Prosecuted in a Court of Law. --- Please Note: We take our Privacy very seriously.


--
You received this message because you are subscribed to a topic in the Google Groups "RailsInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/railsinstaller/DIAVMarHKZE/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to railsinstalle...@googlegroups.com.

Evan Machnic

unread,
Mar 27, 2013, 2:25:24 PM3/27/13
to railsin...@googlegroups.com
Hi Victor,

It's likely that `~/bin` is not in your path. Can you please run `echo $PATH` from the command line and paste the output?

Thanks,
Evan Machnic



Evan B. Machnic // Application Support

Engine Yard

The Leading Platform as a Service

Office: 415.994.5365

Skype: evan.ey

Twitter: @emachnic





Victor Manolucci

unread,
Mar 27, 2013, 2:33:00 PM3/27/13
to railsin...@googlegroups.com
Its like now whatever I'm doing is resulting in some conflict, I wish I could skype you in to see for yoru self

Best,
V-

This message was sent by:
Victor Manolucci, Operations 
MANOLUCCI Handbag Factory
220 61st street, Unit 2D
West New York, NJ 07093 
Skype: Vicbysog
www.MANOLUCCI.com 

NOTICE: The Information in this Email is Confidential, Private and considered Legally privileged information. It is solely intended for the addressee(s) and no one else. The addressee(s), or anyone who intercepts this Email, is not permitted to show or discuss the contents of this Email with any person(s) without the sole written consent of Manolucci Designs, Inc. Violators will be Prosecuted in a Court of Law. --- Please Note: We take our Privacy very seriously.


Evan Machnic

unread,
Mar 27, 2013, 2:35:26 PM3/27/13
to railsin...@googlegroups.com
Hi Victor,

My Skype is evan.ey. Feel free to ping me.

Thanks,
Evan Machnic



Evan B. Machnic // Application Support

Engine Yard

The Leading Platform as a Service

Office: 415.994.5365

Skype: evan.ey

Twitter: @emachnic





Message has been deleted

deli...@gmail.com

unread,
Apr 10, 2013, 12:39:59 AM4/10/13
to railsin...@googlegroups.com
I know this post is old but i figured out a simple way to open sublime text in windows CMD (AKA command prompt) 
and i didn't find this any were so i decided to share for those having trouble with this.

1)find the sublime_text.exe directory. i found mine in C:\Program Files\Sublime Text 2\ (copy the directory with (CTRL + C) if its the same.)

2) go too START > right-click computer> go to properties> go to advanced system settings on the left side> at the bottom of the advanced tab click environment Variables>
then go to the system variables box (the bottom box), and scroll until you find "PATH". (NOT PATH TEXT) >click it and scroll to the end of the path variables box.
*(WARNING DON'T DELETE ANYTHING FROM THIS PATH UNLESS YOU KNOW YOU PUT IT THERE.)*  then add to it " ; "  and past "C:\Program Files\Sublime Text 2\"  

the semicolon separates the lines all the directories aren't read as one. 

when your done the new path entry should look like this Example  ";C:\Program Files\Sublime Text 2\" (click ok)
now you can test it going into cmd by pressing the (windows key + R) and type CMD enter, or goto start type cmd and click cmd or type enter. then type without changing directory "sublime_text" [enter] and it should open.

this last part isn't needed but i did it to make it so i can open sublime text by typing st2 in cmd.
3) open a txt file in notepad> type the line 

"START sublime_text %1" 

go to the file save as> navigate to "C:\Program Files\Sublime Text 2\" > type "st2.bat" in file name box> then change the save as type to "all" and click save.

now you can test by typing st2 in cmd and it should open sublime_text. 

Enjoy!

Chiquito Castaneda

unread,
Apr 29, 2014, 6:49:14 PM4/29/14
to railsin...@googlegroups.com
       I followed the below instructions but I came upon "Variable Name and Variable Value". I which one do you insert this cmd?

Natalia Melekhova

unread,
Sep 16, 2014, 10:01:08 PM9/16/14
to railsin...@googlegroups.com
Thank you! It works.


вторник, 9 апреля 2013 г., 23:39:59 UTC-5 пользователь delicrux написал:
Reply all
Reply to author
Forward
0 new messages