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
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
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
Related
I usually use rvm, but also need to work with a custom Ruby build. I understand that when I go to the RubyMine "Settings", "Languages & Frameworks", "Ruby SDK and Gems" dialog, I need to press "+" and select "New Local with Custom Configurator".
On that dialog, the Ruby interpreter path is self explanatory, but I don't know which environment variables I need to specify in the "Custom Configurator" session. What information needs to go there?
I am using RubyMine 2021.1 on both Mac OS and Linux. I need to be able to debug, which means that when RubyMine installs the debug support gems, they need to go to the right location, and be found from that location.
It turned out that all I needed to specify there was my GEM_HOME:
env GEM_HOME=/opt/my-custom-ruby/gems/2.7.0
I was surprised that I didn't also need to explicitly set the path to the directory containing the Ruby interpreter (for commands other than ruby, such as bundle), but I guess RubyMine does that for me. Or, maybe it doesn't, and I just haven't encountered an error yet.
Edit: It turns out I did have an issue with a gem not being found. I added to that env command and the problem went away, but I'm not really sure yet if that was the issue or if adding both GEM_PATH and PATH were necessary. Here is what I wound up with:
env GEM_HOME=/opt/my-custom-ruby/gems/2.7.0 GEM_PATH=/opt/my-custom-ruby/gems/2.7.0 PATH=/opt/my-custom-ruby/bin/ruby:$PATH
EDIT 2021-12-24
I just tried this again on a new installation and the above did not work. I was getting build errors saying that I needed to install the development tools. It turned out that when specifying the path in the
Custom Configurator field I needed to include the path for the gcc compiler. I just put most of the paths in my login PATH value there, and the gem installation succeeded.
I am trying to run algolia for the first time but it seems that there is something wrong with my environment. I followed the detailed explanation here https://community.algolia.com/jekyll-algolia/getting-started.html.
I installed and configured everything that is needed from the previous steps but when I run the command
ALGOLIA_API_KEY=xxxxxxxxxxxxxx bundle exec jekyll algolia
I get an error:
'ALGOLIA_API_KEY' is not recognized as an internal or external command,
operable program or batch file.
I have been rereading the documentation for both jekyll and angolia but couldn't find anything that could be helpful.
Since you're running on Windows, you cannot set an environment variable for your command like you can do on UNIX.
As advised in this question, Setting and using variable within same command line in Windows cmd.exe, I believe you could use
set ALGOLIA_API_KEY=xxxxxxxxxxxxxx && bundle exec jekyll algolia
I have Fedora 20 and want to install a .cab file. I found the proper way to do this is with synce (http://linuxmanpages.net/manpages/fedora21/man1/synce-install-cab.1.html). However when I type:
synce-install-cab - install .cab data.cab
or
synce-install-cab - install data.cab
I get the following message:
Enter .cab file as parameter
How can I install my cab file properly?
Thanks in advance.
Okay, so, two things.
First, are you sure this is the command you want? This command is for installing software in .cab files to Windows CE devices. If you don't have that, maybe you want cabextract (although that won't, of course, make Windows software actually run on Fedora).
Second... I don't know this actual command (as I don't have a a Windows CE device), but, from the man page you linked, there's no reason to run synce-install-cab - install .cab data.cab — that's not instructions, it's just the summary at the top of the file. The actual command seems simply to be
synce-install-cab data.cab
I'm a brand new coder trying to wean myself off of the Codecademy web environment. I'm using Sublime Text 3 in tandem with Sublime Linter 3 in order to approximate the real-time error-checking to which I've become accustomed from Codecademy's site.
I know that each linter needs to be installed separately in ST3 and I've successfully integrated "csslint" and "jshint". Both work properly.
Now, I'm trying to get an html linter to error-check my html code and I can only seem to find "HTML Tidy", which I have installed via package control. Unlike the aforementioned linters, which simply require a pre-defined command line string for input at terminal, online tutorials have me installing "HTML tidy" via a winrar executable.
Now I am regrouping and would greatly appreciate any feedback you can provide that might move me incrementally closer to having a working HTML linter. I am using a windows xp computer. Many kind thanks for your help.
According to the Installation Instructions for the plugin, there is a Windows binary for Tidy available here.
For some background, Tidy is a command line tool that comes pre-installed with Mac and Linux but not Windows. Downloading the binary mentioned here and placing it in your path will allow it to be run. To check where it should be placed, run echo %path% from the command line.
Once that is there it will work. To see the available arguments to be run with Tidy, run tidy -help from the command line. These arguments can be added to "args" linter settings.
Just copy tiny.exe to folder C:\Windows\System32\, and restart ST3.
how can I run a sublime plugin from the command line?
I have read of a subl --command but it seems to be for osx and i'm on windows. http://www.sublimetext.com/docs/2/osx_command_line.html I see nothing there to call a plugin, and the commands don't seem to work for sublime_text.exe
i'm on Windows, with sublime_text.exe
Sublime Text plugins do not offer command line interfaces.
Many times Sublime Text plugins wrap an external command (csslint, jshint, etc.) which is run as a subprocess by the plugin. Because your question does not specify which plugin you want to run it is impossible to tell whether or not this plugin is based on an external program.
I'd rather suggest you to ask your question in more sense "How do I solve problem X from the command line" as it sounds you are approaching the problem from the wrong angle.