Where can I find a complete tutorial for Windows? Trellis + Sage

Might you have any resourceful links to share?

I just want to get rockinā€™ and rollinā€™ but everything (for Win users) is scattered. Iā€™m looking for some sort of nipple-fed, spoon-feeding. The docs on this page suck - https://roots.io/trellis/docs/windows/

  1. Install VMware Workstation
  2. Download Ubuntu Desktop ISO local
  3. Create new virtual machine (using ISO)
  4. Log into VM using credentials created during install
  5. Install ansible on VM, navigate to this page
  6. Ā® click new terminal > punch in command to install terminal sudo easy_install pip
  7. Errors + Facepalm + Flip Desk

I invested cash for the theme-development-with-sage-second-edition.pdf but itā€™s not helpful getting Windows users onboard, stuck on Page 10.

Thanks in advance and take care,

p.s. - just cruising through the Theme Development with Sage eBook, I wonder ā€œWhy would anyone use Roots without Soil Plugin?ā€.

2 Likes

Thanks, we appreciate the constructive input! :expressionless:

I can tell you right now that ā€œDownload Ubuntu Desktop ISO localā€ isnā€™t required.

Install Vagrant and itā€™s dependencies, then however you use the command line on Windows, you do the same as on OS X and Linux, you run vagrant up from the Trellis directory, after following the same instructions for installing and setting up Trellis. You donā€™t create a new virtual machine manually, Vagrant handles all that for you, neither do you install Python or pip manually. I donā€™t see where you got any of those instructions from the Windows docs.

3 Likes

PRs accepted. :middle_finger:

A Windows Userā€™s Quick Guide to Using Roots Stack

Requirements

While not required, I would also recommend installing the full version of cmder. It will come with git, ssh, and many other binaries and aliases that are needed to get shit done.

Development Environment

(Poached from roots-example-project.com/readme.md)

  1. Clone this repository into a working directory (e.g., %userprofile%\Sites)
$ git clone git@github.com:roots/roots-example-project.com.git
  1. Install theme components
# @ roots-example-project.com/site/web/app/themes/sage
$ npm install
$ bower install
$ gulp
  1. Fire up the server (be patient, but watch the consoleā€“ā€“it may prompt for your system password)
# @ roots-example-project.com/trellis
$ vagrant up
 _Note: to shut down the server:_ `vagrant halt`
  1. Test the install at roots-example-project.dev

Fin.

Following those steps on a new installation of Windows 7-10 should yield you a working copy of roots-example-project.com. You can tinker with it and modify its configuration as needed to suit your needs. You can also follow the instructions in the projectā€™s repo on how to manually compile the stack by yourself.

7 Likes

lol @ middle finger and cyberbully nicknameā€¦gonna try this out right now. cmder looks pretty wicked.

ā€œFriends donā€™t let friends use Windoze.ā€ :cry: run an OS with an better kernel like Linux or OS X dude.

1 Like

Easy to say, hard to do sometimes. Iā€™d love to have another machine for Linux and/or macOS, but there isnā€™t the budget for one right now.

The instructions from @QWp6t are dramatically more straightforward than the main Trellis instructions, thank you!

I followed them through using full Cmder (with git) although I had to run through setting up SSH access to GitHub first.

I ran into problems with Node 7.4.0, but uninstalling and installing 6.9.4 solved those problems.

Also, I had to manually add bower to my Windows PATH.

2 Likes

Hey guys,

Sorry to post in an old thread but its pretty much relevant to what I am doing. I had another post here: Vagrant Up Hang on new install and wasnā€™t sure whether to post back in there OR in a new oneā€¦ This one seems to fit what I am having an issue with.

Basically I am trying to get sage up and running on my windows 7 machine. I have a very old roots theme which I used (back in 2013) and fell in love back when grunt was the rageā€¦ Moving on and its time for an update BUT I cannot seem to get things off the ground :cry:

Over the last week I have actually pulled my hair out and am about to call quitsā€¦ hoping one last desperate attempt will show me what I am doing wrongā€¦

SO I had the following installed (will try and be as concise as possible):

windows 7 with SP1 and net 5 framework installed
VB box 5.2.8
vagrant 2.0.2
node 8.10.0
git 2.166.2 (in case i need it)
windows firewall OFF
eset antivirus OFF

When i ran vagrant up from trellis folder seemed like it worked BUT the box was always powered off.

If i then left and came back after a pc restart i could manually power the box on from VB gui (still couldnā€™t view the site) BUT whenever I did vagrant up from trellis folder it didnā€™t power on (if I then tried to manually start it the it gives the session error). I checked the hosts file that had the correct lines etc. in it. I was following this guide: https://roots.io/trellis/docs/installing-trellis/ and this one: https://roots.io/trellis/docs/windows/ which doesnā€™t really make sense as some one has already pointed out.

So for sanity (in case i was doing something wrong) 3rd time round I removed everything and started fresh! Ensured that no files lingered and all folders were deleted. Full strip down and deleteā€¦

I used all the above installs again, with those versions listed.

I got it all installed (VB,vagrant, node, nmp, bower) and followed the steps as listed in this post above.

However I am having the same issue! The box is still powered off. Running vagrant up does go through the process (installs the plugins (hostmanager/bond) ansible and all the vb box stuff) and it does give you the message that the box is provisioned and turned on (with no errors shown) ā€˜the trellis box is ready to useā€™ BUT going to localhost:3000 or the roots-example-project.test fails.

I can ssh into the box by doing vagrant ssh and can view the files on it no issues there. maybe i am being a bit thick here. Should i be viewing localhost:3000 on the VM? could it be that simple? if so how do i do that? its powered offā€¦

Can anyone shed light on why this is happening. Cannot seem to get off first base and desperately want to get sage working and to stop pulling out the little hair i do have left on my head :frowning:

1 Like

Are you running the Virtual Box gui as administrator? I had similar problems in Windows 10 while running Trellis commands as administrator with the Virtual Box gui opened, but not as administrator.

2 Likes

thank you @esaner that did the job. Such a simple thing!

FYI i never ran VB box at all. simply ran vagrant up. when it wasnt working then i ran vb box just to see if it was powered n.

This time round I ran it with admin mode first then ran the vagrant up command. example site now up :slight_smile:

Maybe my article could help to someone setup Trellis quickly on Windows https://medium.com/@payter/how-to-setup-trellis-wordpress-installation-on-windows-for-php-storm-easiest-setup-7cafb570559f

When running NPM install, Iā€™m getting a ā€œcould not find PYTHON in env variableā€ error. I thought Python was not a dependency?

Here is the call stack

Building: C:\Program Files\nodejs\node.exe C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose',
gyp verb cli   '--libsass_ext=',
gyp verb cli   '--libsass_cflags=',
gyp verb cli   '--libsass_ldflags=',
gyp verb cli   '--libsass_library=' ]
gyp info using node-gyp@3.7.0
gyp info using node@8.11.3 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` failed Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python { Error: not found: python
gyp verb `which` failed     at getNotFoundError (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python\n    at getNotFoundError (C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\node-gyp\lib\configure.js:492:19)
gyp ERR! stack     at PythonFinder.<anonymous> (C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\node-gyp\lib\configure.js:517:16)
gyp ERR! stack     at C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\graceful-fs\polyfills.js:284:29
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:152:21)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Conner\\Desktop\\Online Portfolio\\Development\\Gesbocker-Redesign\\Trellis-Test\\roots-example-project.com\\site\\web\\app\\themes\\sage\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\Conner\Desktop\Online Portfolio\Development\Gesbocker-Redesign\Trellis-Test\roots-example-project.com\site\web\app\themes\sage\node_modules\node-sass
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@3.13.1 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@3.13.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Conner\AppData\Roaming\npm-cache\_logs\2018-07-25T22_57_10_676Z-debug.log

You can always dual boot, I have only 1 laptop, Itā€™s easy and safer now than before.

ā€œVirtualBox is known to have poor performance in Windows ā€” use VMware or see some possible solutions.ā€
This was enough to stop me from using windows and switch to Ubuntu. Dual booting both system is simple.
It will save me hours of headaches. (Even through linux is not perfect either and will give you headches as well but using it makes me a better developer by understand more how linux servers work). With windows is so frustrating since most tutorials are for MacOSX or sometimes linux.

2 Likes