Unable to install SASS on Windows machine using ruby - ruby

I have just install Ruby Installer 2.3(x64), on my Windows machine as I wanted it for SASS.
On typing
gem install sass in "Start command prompt with Ruby" , it shows the error:
'gem' is not recognised.
Please Help

Try running ruby -v on the command line. If it throws up an error, try adding ruby to path. To add this:
Go to Computer.
Click on properties at the top left
Click on Advanced System Settings
Click on Environment Variables at the bottom right of the popup
Open another tab and look in the C: drive to find Ruby is installed. It should be C:\Ruby23-x64\bin or so. Copy the path.
Go back to the environment variable and click on PATH.
Choose edit option and add the a semi-colon ; before pasting the ruby path copied.
Note
Your windows machine may be slightly different. I am using Surface Pro 3 which runs on Windows 8.

Related

WSL with VS Code: Why doesn't VS Code see my WSL installation?

I have successfully installed Ubuntu with wsl. I then installed VS Code and tried to browse for the directory on Ubuntu that contains a dummy project. It doesn't see WSL/Ubuntu at all but I can open it in Sublime Text. When installing VS Code I wasn't given any option to add to path so I assume there's no issue there. Tried code . in my project directory and that didn't work, just got an error, command not found. Maybe I'm doing something wrong, just don't know what.
Why doesn't VS Code see my WSL installation?
1.) Make sure that you have installed the extension "Remote - WSL" in VSC.
2.) Make sure that the WSL is really installed.
3.) Open VSC and press the green "> <" in the lower left corner.
4.) Then press "New WSL Window using Distro".
5.) Choose your distro, (Ubtuntu, Debian, Kali etc)
6.) If everything worked, you should see "WSL: Debian" in the bottom left corner, or whatever you have chosen

Git windows installer not letting me choose install location

I am trying to install git using their windows installer from https://git-scm.com/downloads (I have windows 10). When I try to install Git I get unable to get system config then I get " C:\Users\Me\Appdata\Local\Temp\is-VML96.tmp\git-config-get.txt"
Its weird but If I click okay through both it takes me to the standard install setup as seen below:
Now if I click next it SHOULD take me to this screen:
The problem is I never get this screen to choose where I want to install git. I never get this screen above, my computer tries to install it to my system reserved which is only 100Mb.
I have tried multiple different versions of git.
What is causing git not to allow me to choose an install location?
If you run the installation executable from a command line and pass /help you'll get a list of additional commands you can run. The one you need is:
/DIR="x:\dirname"
Here's the list of available arguments:

Don't get GraphViz and phpDocumentor to work

I'm trying to create a php documentation on my local XAMPP host (on Windows 7) with phpDocumentor.phar (v2.). It gives me (after parsing all the files) this error:
Unable to find the dot command of the GraphViz package. Is GraphViz correctly installed and present in your path?
I searched a lot, but nothing helps. What does 'path' means? If I open a command box at any location I can start the dot.exe (which gives me no output but waiting prompt). In my environment path variable the bin folders is added. GraphViz is installed correct in Program Files and runs standalone.
What could I do or check?
In order to get GraphViz running properly with a Windows based phpdoc installation, just put the GraphViz program directory (c:\some\path\graphviz\release\bin) to the Windows Path system variable.
In order to do this, follow these steps (Win7, please provide your OS version if this doesn't apply to your situation):
From the desktop, right-click My Computer and click Properties.
In the System Properties window, click on the Advanced tab.
In the Advanced section, click the Environment Variables button.
In the Environment Variables window, highlight the Path variable in the Systems Variable section and click the Edit button.
Different directories are separated with a semicolon:
C:\Program Files;C:\Winnt;C:\Winnt\System32
It will most likely look a bit different in your enviroment, so please just take this for an example. Just add the GraphViz Path at the end like this:
C:\Program Files;C:\Winnt;C:\Winnt\System32;C:\somefolder\graphviz\release\bin
I'm not too sure if you have to reboot your system after changing this value. You had to do this in the old days of Win2k, and I just don't know if this still applies to modern Windows versions. It surely doesn't hurt!
After this, phpdoc should be able to find the dot command.
The steps to resolve this error are:
download Windows Packages from
https://graphviz.gitlab.io/_pages/Download/Download_windows.html
Just install it
add c:\Program Files\Graphviz*\dot.exe or c:\Program Files (x86)\Graphviz*\dot.exe to your environment variable PATH
run phpdoc
Re-start your machine & run phpdoc (if still shows the same error message)

installing behat on windows 7: not getting the autoexec

I'm trying to install behat on a Windows Virtual Machine, but I'm getting stuck with the windows command prompt. Here is what I did:
Installed xampp
Installed Composer for windows
Donwloaded behat using the git method (other methods do not
work for me) to C:\behat so that
C:\behat\bin\behat.bat and C:\behat\bin\behat both exist
open windowns control panel
search for "environment"
click "edit the system environment variables"
system and security > edit the system environment variables: add the the end of PATH "C:\behat\bin"
At this point I expect to be able to type in behat anywhere on my system using the command prompt as administrator, because the "bin" directory containing "behat.bat" is contained in the PATH, but typing in "behat" gives me "Could not open input file #bin_dir#\behatcd". typeing in behat.bat does not work either
I have never used Windows before so, this is probably obvious but I'm just not getting it.
Any advice greatly appreciated, thanks.
Albert
try typing
php behat
windows doesn't know behat is a php file and you need to tell it what to execute it with
Here you can find the step by step guide to install Behat on windows machine. openguider

sass not recognised using Windows command shell

I've installed ruby and the sass gem on a Win 7 Enterprise box. I've had issues throughout the process, and had to download the gems and install them from local to avoid other issues.
gem install --local sass-3.1.19.gem
I'm trying sass --watch styles.sass:styles.css but I get the standard sass isn't recognised error from the command line.
I'm really new to ruby so I could well have missed a step.
Thanks in advance
In order to run commands without specifying full path, you need to have the path to the program in you PATH variable.
So if your program is located in C:\Programs\rubygems\gem\sass you'll need to add C:\Programs\rubygems\gem\ to PATH.
The process of adding a folder to PATH for the Windows command line prompt is described here.
For Windows Powershell, please check Setting Windows PowerShell path variable here on SO.
After installing sass with NPM you got this:
npm install -g sass
file:///C:/Users/yourName/AppData/Roaming/npm/sass ->
C:/Users/Administrador/AppData/Roaming/npm/node_modules/sass/sass.js
You can create the path. Go to environment variables - > system variables -> path -> Edith , and include file:///C:/Users/yourName/AppData/Roaming/npm/sass. Then, Accept everything. and it's done.
Yes, putting the path to my ruby bin did indeed solve this.
My Computer --> right click, Properties --> Advanced system settings (left hand column) --> Environment variables --> find Path in the bottom list, highlight and edit --> include ;c:\path-to-ruby\bin at the end --> OK back out through the windows.
Thanks!
If you using Windows 10 v1607 (latest update as March 2017), you need to follow following steps:
Right-click on start menu & select System
Click on Advanced System Settings (left hand column)
Click on Environment variables button
In top section, select Path (or PATH), then click on Edit button
Inside opened window, click on New button
In selected input area, type (for ex.) C:\Ruby22-x64\bin\ (its must be path to ruby's bin folder)
Click OK, twice
Re-open Command-Prompt, now sass is ready to watch and compile your sass files.
If you have Node installed use the node terminal instead of the windows/VSCode terminal.
Search for the Node terminal on the windows search tool placed on the right side of the windows start button.

Resources