6 ms·
They've got enough market clout now that people will port Ruby/Python/Perl to a non-Unix macOS, just as they port them to Microsoft Windows. Ruby on
by JohnBooty 7y ago
They've got enough market clout now that people will
port Ruby/Python/Perl to a non-Unix macOS, just as
they port them to Microsoft Windows.
Ruby on Windows is a nightmare.
To be specific, Ruby itself (the core language and core libraries) are pretty good on Windows. Great choice for a scripting language, or whatever else you want to do.
But libraries like ActiveRecord, Rails and their myriad dependencies are very very hit or miss on Windows and there's not a lot of support when things go badly.
A lot of the issues are simple - like dead simple. Lot of gem authors don't bother to make things like file paths (forward slash vs. backslash) system agnostic. Or the gems depend on compiled binary stuff like Nokogiri or ImageMagick and those are always a bit of an adventure on Windows.
If MacOS drifts farther away from Unix they will cease to be the platform of choice for many developers currently using it today.
- tty2300 7y agoThe funny thing is I have been a rails dev for years and didn't even know it didn't work on windows because I have never tried and don't know any dev ever using windows.
- taf2 7y agoIn the early days of rails say 2006, it was definitely more common place... but I guess there were fewer of us back then ... I know as a maintainer of curb I have a few windows users
- malyk 7y agoI started with a ruby/rails project in 2007 and after 3 days of fighting my work issued windows machine I just went out and bought a white macbook and things were up in running in an hour or two. I've never looked back.
- kowdermeister 7y agoThat just proves you live in a bubble :) I never got into RoR because it sucked so much on windows and every single tutorial was OSX focused. I just sticked to alternatives that worked.
- ffdjjjffjj 7y agoSo which companies are actually doing RoR development on Windows? Do they also deploy to Windows Server (?) in production? I guess I live in multiple bubbles because I’ve worked for tech companies in several different major metros and I’ve never heard of this as a mainstream thing.
- kowdermeister 7y agoIt is not like that. My point is that there's a barrier to entry to RoR that you should own a Mac. I gave up because my home setup is Windows based and I won't change it for the sake of a hyped framework or tool. But none of this is surprising considering where RoR is coming from, I'm not sad or upset about it either :)
- tty2300 7y agoYou don't need a Mac. RoR works perfect on Linux as well.
- tekknik 7y agoit seems like you’re blaming RoR for a problem that is actually due to windows being “different”. almost every OS besides windows is a nix or nix clone and POSIX compliant or certified. so who’s really the problem here?
- paulcarroty 7y ago> Ruby on Windows is a nightmare. The same stuff with Node.
- AlfeG 7y agoNot sure why? Yeah there were times with damn node-gym not compiling for whatever reason. But nowadays things run pretty smooth.
- paulcarroty 7y agopaths, compilation etc. Windows isn't main server platform, so people seems like just don't care.
- nailer 7y agoYou can use / on Windows in node perfectly, and Windows node now installs required devtools for native modules at the end of the process. It's pretty easy these days.
- paulcarroty 7y agoYou can use it, yep, but devtools aren't enough. You'll meet a lot of issues sooner or later. Windows is second-class citizen for Node, Linux or macOS are much better - just share my experience.
- underwater 7y agoBeing a second class citizens is very different from being a nightmare. I've been able to build some fairly complex apps (TypeScript, Next.js, Relay, SQLite, Express) without running into any issues at all, and if I do hit a roadblock I know I can bail out to WSL or a VM. The experience isn't as nice as macOS, but it's not terrible by any stretch.
- nailer 7y agoPersonally I moved to Windows about 2 years ago, have been developing node all day during that time and deploying on Linux. It's been great since about node 8. What have your issues been?
- ken 7y agoBut macOS uses '/' as a directory separator already. They're not going to arbitrarily change trivia like that -- at least, not short of killing the concept of a filesystem altogether. (True, if anyone was going to do that, Apple would, but APFS is brand new. That's not going anywhere.) Apple isn't changing things just for the sake of change. They're removing 1970's-isms where they hold back the platform. Languages like Ruby/Python/Perl also clean house, from time to time, to remove old cruft. I can't imagine any legacy feature of macOS that Apple would want to deprecate which would make it more difficult to maintain a good port of Ruby/Python/Perl. These are regular general-purpose programming languages now, not just Unix scripting languages. Yes, Unix has been one of the developer systems of choice for the past couple decades, but it wasn't always so, and it hasn't been the only one. I hear more developers than ever using and enjoying other systems like Windows (Powershell) today. Even Linux today is pretty far from traditional Unix. I just don't see perfect Unix compatibility as a necessary component like it was in 2001.
- saagarjha 7y ago> macOS uses '/' as a directory separator already Depends on what level of the UI you're dealing with.
- ardy42 7y ago> But macOS uses '/' as a directory separator already. IIRC, HFS actually uses a ':'.
- cynwoody 7y agoMac OS versions prior to OS X used ':'. Mac OS X, initially released on 24 March 2001, uses '/', like other Unix-derived systems. Also, like other unices, OS X uses '\n' as the line ending. Prior Mac OSs used '\r' as the line ending. Windows uses '\r\n'.
- codesnik 7y agobut in Finder you can use "/" in filenames, and can't use ":". They got swapped if you look on the file from Terminal.
- dragonwriter 7y ago> But libraries like ActiveRecord, Rails and their myriad dependencies are very very hit or miss on Windows and there's not a lot of support when things go badly. I haven't done Rails for a while, but when I did Rails (including ActiveRecord and all its other components) Just Worked o bWibdows (lots of the peripheral ecosystem of Rails and Ruby more generally was a nightmare, but Rails itself was great), and overall the Ruby (outside of Rails) experience on Windows has gotten better with Ruby installer + DevKit, which hasn't closed all the gaps but does mean that even libraries with C extensions frequently just gem install and work on Windows; I'd be surprised if Rails itself had gotten worse in this area.
- jmkni 7y agoThe Windows Subsystem for Linux fixes a lot of these problems, you can even point VS Code at Ubuntu now on Windows and avoid CMD entirely.
- TheRealDunkirk 7y agoI was someone who installed the first beta of Windows that included this, just to try it out for Rails. It had LOTS of problems. I filed bugs. I kept trying over the next couple of versions, and finally gave up. I tried it again a few months ago, and, again, ran into a show-stopping problem of some sort, and gave up again. Are you saying that you use it "in anger" for serious development, and have no issues? People complain about doing Rails on Windows, and, while there's definitely extra friction, and I hate Windows in general, I have really good luck with RubyInstaller. I used to have a hard time with ExecJS, but now I just install Node (on either Mac or Windows), and I'm usually off and running.
- xenorplxx 7y agoI am using WSL more and more often nowadays and it's really good now, it works just like you'd expect Ubuntu (or other distro you choose) to work. The only thing I've had to do is turning off anti-virus real-time protection for linux subsystem. Hell, not only VSC supports WSL. RubyMine can manage rbenv/rvm on WSL and more https://confluence.jetbrains.com/display/RUBYDEV/How+to+add+WSL+SDK+on+Windows+to+RubyMine https://confluence.jetbrains.com/display/RUBYDEV/How+to+add+...
- JeremyBanks 7y agoI've done most of my Linux development on WSL for the last year. It stuggles sometimes under certain types of heavy IO load, and there are ocsssional compatibility issues, but overall it's been impressively reliable and convenient.
- maxsilver 7y agoI use WSL (without anger) for serious development, for about two years now and have had almost no issues. Running 'Pengwin' (Debian) Linux via WSL, RVM using Ruby 2.4.1 + Rails 5.1.7 and Ruby 2.6.2 + Rails 6.0.0.beta3 Today, everything works just as expected, right out of the box with no effort. This includes ActiveRecord (to SQLite, MariaDB, and PostgreSQL), including Node.js / Asset Pipeline, Prawn PDF and ImageMagick integrations, uploads to AWS, email integrations, capistrano-based deployments, Heroku Gem + integration, and so on. It's gotten to the point where we spend more time helping OSX folks figure out occasional Homebrew weirdness, than we do helping Windows folks with WSL. Especially since WSL people can almost always just re-use any Ubuntu instructions verbatim.
- tempodox 7y ago> Ruby on Windows is a nightmare. Any software on Windows is a nightmare. Nothing works as it should, least of all MS's own crapware.
- Stratoscope 7y ago> file paths (forward slash vs. backslash) Windows file APIs have always supported forward slashes in file paths, even before there was Windows. This goes all the way back to MS-DOS 2.0.
- jjgreen 7y ago> Ruby on Windows is a nightmare. It hurts when I do this ... [punches self in face] ...
- deleted 7y ago[deleted]
- e12e 7y ago> Ruby on Windows is a nightmare. Nightmare? No. Suboptimal? Yes. We're running some legacy rails 3.2 against oracle db on windows, and it works well enough. It sure is a lot more pleasant on linux, though. Biggest challenge on windows is to get a c compiler working/get binary dependencies working. Other than that, you need a version manager (same for other platforms really, unless you're aiming to shoot yourself in the foot). Ruby on windows is definitely not great, but "nightmare" is a bit much.
- JohnBooty 7y agoWe probably agree on an objective level. I would agree with you that nearly all of it works nearly all of the time. But that's my idea of a nightmare - when things are suboptimal and you're often scrambling for solutions on a second-class platform. When I say "often" I don't mean "every day", but in my experience it happened enough to make me swear off Rails on Windows forever. Of course maybe 5.x is different. My experience was in the late 3.x and early 4.x days