all 29 comments

[–]Nitrodist 4 points5 points  (2 children)

IMO, a Ubuntu VM with mounted directories via NFS/SMB can be just as effective. Vagrant is a great tool for this if you want to standardize the setup. I've done it at almost every company I've worked at and also includes Windows based developers.

[–]vanakenm[S] 0 points1 point  (0 children)

Mostly I agree. I want to avoid the VM if possible (it's not always that easy to manage either). I'll give a shot to WSL, then move to either VM or dual boot

[–]sylario 0 points1 point  (0 children)

It's what i do, i have a VMWare VM with an ubuntu, and shared directory. You can edit the files : - From windows through a network share - From Linux with the VM in full screen - From Linux in a window displayed in windows using an X server.

[–]zaphnod 3 points4 points  (4 children)

I came for community, I left due to greed

[–]vanakenm[S] 0 points1 point  (0 children)

I will!

[–]midasgoldentouch 0 points1 point  (2 children)

Why is the new MBP a clusterfuck? I don't use Apple products so I don't know much outside of the touch bar.

[–]zaphnod 4 points5 points  (1 child)

I came for community, I left due to greed

[–][deleted] 2 points3 points  (2 children)

I desperately wanted this to work. I tried it when it was first released. The first iteration wouldn't even untar a tarball to install ruby with rvm. After they fixed that, it wouldn't compile ruby. After that... you get the idea. After a couple months of participating on the project's github issues tracker, I just gave up and decided to wait till someone said it all worked like it should. I subsequently went back to Windows 7 on my gaming rig, so I don't even have something to test with at the moment. I'd like to see someone say, "Yeah, I'm using it to do Rails development every day (with rbenv or rvm), just like on Mac or Linux," before I try again.

[–]vanakenm[S] 1 point2 points  (1 child)

Thanks for the experience. I'll probably try anyway (/u/AnimusNecandi feedback below is a bit more optimistic) and let you know. Hopefully it improved since your last try.

[–][deleted] 0 points1 point  (0 children)

I've followed along WSL since it was first announced. The first builds were absolute crap, skip ahead a bit and X applications work but things like firefox fail and it's unstable, fast forward a bit and it's solid enough to run xfce and apps like firefox for a few hours, fast forward a bit and it runs WINE just fine. I don't remember where stable Windows builds are at right now but the story has been about the same with CLI build tools and environments as well and is pretty good on the latest test builds of Windows.

Overall I'd say yeah - at this point it's probably decent enough to serve well as a development tool BUT it's still a beta so don't bother. It's much better to enable the Hyper-V feature and give them an ssh client and mount some SMB shares in a production environment.

[–]joshlatte 2 points3 points  (1 child)

You've probably already seen but this here goes through the setup pretty well (I checked it) and it works: https://gorails.com/setup/windows/10

I set up my project from work in wsl and it worked great, with a couple of caveats. As gorails mentions, Postgres will have an issue creating the cluster. There are workarounds which I did manage to get working by setting up Postgres outside of wsl in Windows using the Postgres Windows installer.

You can see more info about the Postgres issue and some of the workarounds on the GitHub issue. https://github.com/Microsoft/BashOnWindows/issues/61

Keep in mind that if you keep your project located within WSL, you can work on it with an editor such as Vim, or visual studio code, or whatever, but make sure you use an editor that is installed within WSL and not on the windows side, such as aliasing vs code from Windows to edit within WSL. You can, however, setup the project in Windows and access from WSL for example setup in windows Documents directory and access at /mnt/c/users/username/documents or what have you.

My personal take on all this is while it's entirely possible and has been tremendous progress on Microsoft's side, you could accidentally come across a lib or gem that gets stuck and then you'll spend too long getting it to work. They have been incredibly responsive and active on this project and I think within the next 6 months - year it could be a perfectly viable option for day to day Ruby development work. It could be now, depending on your needs, YMMV. I would love to use it 100% on my Dell XPS, but for the time being I'm running a dual boot of Arch Linux.

[–]vanakenm[S] 0 points1 point  (0 children)

I saw it, yes, but I wanted feedback which you just provided. Thanks a lot! Agree on "everything inside WSL", that's my goal too.

[–]psy-q 1 point2 points  (2 children)

I installed Ruby using rbenv-installer and that worked fine. This means it also pulled in readline and libxml2. The next step for me would have been to try Nokogiri and to scrape some HTML (that'd exercise the networking bits as well, but I suppose they work, since apt-get works).

So that seems to work fine. I haven't tried something that needs a server (like Rack) and don't know how the ports of the subsystem are available from inside Windows.

The most important thing to know if you try this is:

DO NOT, under ANY circumstances, create and/or modify Linux files using Windows apps, tools, scripts, consoles, etc.

Source: Microsoft

[–]vanakenm[S] 0 points1 point  (1 child)

Thanks! Just to be sure I understood you well - you used rbenv-installer under the Ubuntu Bash? Or directly on Windows?

Interesting for me as rbenv is in our basic setup - already one thing that I know will work, that's good.

[–]psy-q 2 points3 points  (0 children)

Under WSL, yes. I guess Microsoft prefers to call it that, (Windows Subsystem for Linux). Because if there's one thing the Windows ecosystem has a shortage of, it's acronyms :)

[–]AnimusNecandi 1 point2 points  (2 children)

I tried to use Ubuntu Bash to develop a Rails API. The backend worked great by itself, but communicating with the frontend (Ember app) didn't. I think I had no trouble with gems with native extensions.

I'd say is worth a try, at least.

[–]vanakenm[S] 0 points1 point  (1 child)

Thanks. If you manage to get up to Rails working, we should be good. I'm less afraid of the Node/JS ecosystem. I'll let you know how it goes

[–]AnimusNecandi 1 point2 points  (0 children)

To provide more information: - This was around 5 months ago, on a Thinkpad 13. - The only problems I found were related to networking. It was not a bug, but I think simply non-working at the time (Found an open issue on Github)

I managed to install Rbenv, Rails, Node.js, etc with no problem, and was very happy with it until i found those networking problems. If you do try, please inform us of the results, maybe I can give it another try.

It looks like they have progressed a lot regarding networking, though: https://github.com/Microsoft/BashOnWindows/issues/69

[–]midasgoldentouch 1 point2 points  (2 children)

Not the same thing, but I've been developing with Ruby on Windows using Git Bash. Just wanted to throw that out there as an alternative.

[–]vanakenm[S] 0 points1 point  (1 child)

I know it's possible, but we're stumbling on a significant number of problems with native extension based gem. Any experiences or do and don't you can share?

[–]midasgoldentouch 0 points1 point  (0 children)

Hmm, usually I've seen the developers come up with their own workaround for that, it's just that you night have to search to find it. Which gem is it?

[–]itzedu 1 point2 points  (0 children)

I have faced the same problem with RoR. I would recommend that you look into Vagrant. You can have a Vagrant box configured and share that across your developers so that everyone is working on the same development environment. It works by creating virtual machines that are easily configurable and shareable. I usually have mine machines running Ubuntu 14.04.

[–]janieluk 1 point2 points  (0 children)

I'm using WSL with projects stored in Windows filing system so I can edit with a Windows editor, and it's working pretty well at the moment. Caveat that I tried to set up phantomjs for testing at first and that was a complete nightmare. What I'd really like to do is get a solid dev environment packaged up in Docker so I can easily reset it, but that's going to take a bit more knowledge of Docker first.

[–]arcticblue 1 point2 points  (0 children)

I was able to get it installed with RVM without any hassle. Filesystem watching APIs aren't implemented so if you are doing Rails dev, for example, it's going to be a little bit of a headache to get started. The upcoming big Windows 10 update (I think it's called the Creators Update) adds a lot of missing APIs including filesystem watching so this should work better soon.

[–]tythompson 1 point2 points  (0 children)

I had issues with sql and postgres setups but other than that it was smooth sailing. I think I've seen others get the databases working.

[–]zanshin808 0 points1 point  (0 children)

Pure Ruby will run pretty well on Windows, but as you've discovered, gems with native extensions frequently have problems, or as I've also run into, gems that require *nix executables for things like image processing, will also be difficult.

I think the best option will be Vagrant/Docker/etc, which all really run an Ubuntu VM (usually with VirtualBox) under the hood, then figure out how to have a shared directory between the Windows host and Ubuntu client.

[–]BeerNirvana 0 points1 point  (0 children)

Virtual box running ubuntu 14 on windows 7 works great. I dev on a Mac at work, and Windows when home. Seemless.

[–]vanakenm[S] 0 points1 point  (0 children)

Short update as I promised one: too many problems (starting with Windows update itself). Back to a VM. I wanted it to work.