I'm brand new to Ruby and Rails, so sorry if this is a totally ridiculous question. The tutorial book that I'm reading says that I should be able to launch a Gemfile in Sublime Text directly from the command prompt using the subl Gemfile command. When I try this, I get an error that says "subl is not recognized as an internal or external command, operable program, or batch file". I am in the right directory where the Gemfile is located. Ruby is definitely installed and I am using the command prompt with Ruby and Rails. i have the sublime text 2 and i added the path as i found,but no solution.i even tried :sublime_text Gemfile i have tried so many different solutions but no result. i'm using windows Thank you in advance
2 Answers
the reason it isn't working isn't a rails question, it is because you haven't set up sublime to work using the command "subl" in your terminal. Try these commands. If you wish to understand the error better, just type in any gibberish into the terminal. It will tell you a similar thing.
sudomkdir /usr/local
sudomkdir /usr/local/bin
sudo ln-s/Applications/Sublime\Text\2.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
EDIT
Sublime Text from Command Line (Win7)
https://teamtreehouse.com/forum/sublime-text-command-line-shortcut-windows
https://teamtreehouse.com/forum/ruby-on-rails-subl-command-not-found
Otherwise, you can refer to this

- 1
- 1

- 1,352
- 1
- 10
- 19
-
He's using Windows, not OS X. – MattDMo Jan 30 '14 at 18:57
subl
is Mac only.
For Windows, you need to add C:\Program Files (x86)\Sublime Text 2
to your Environment path,
This will work on Windows 7:
Right click My Computer
, Properties
, then Advanced System Settings
, then Environment Variables.
. Go down to System Variables
, and edit PATH
, you'll need to add the Path to Sublime.
Then you should be able to run sublime_text my-file
from the command line. (Since the .exe is called sublime_text.exe