简体   繁体   中英

is it ok to use windows platform to develop RUBY project ? or should i use Linux instead?

I am developing a website using RUBY ON RAILS ; JSON for communication API's and MONGODB as the nosql database. So can i go ahead win windows platform or do i need to go with Linux ? If yes .. then which one ? Please suggest the best platform for my project.

I have developed with Rails on Windows, Mac and Linux so I think I have a pretty broad perspective on this.

Windows is doable; but the platform will fight you every step of the way. Linux and OSX are equivalent in terms of setting up a development environment, Linux is a bit easier to get started while OSX has an advantage of a better toolset. I prefer OSX, Linux and Windows in that order.

RVM alone is a pretty compelling reason to use a Unix-based OS.

You need to keep in mind that windows will always be a second class citizen in the ruby (and most of open source) world. It stems from a few things, first is the lack of fork on windows, and the fundamental role it plays in unix apps. Because of that, most of the good app servers don't work at all on windows (passenger/nginx, unicorn, thin, etc). Second big issue is that ruby gems may rely on c libraries that are un available, or difficult to install on windows. Lastly, due to the lack of rubyists using windows, pretty much everything is not terribly well tested on the platform.

As a general rule of thumb, windows is great for windows development, anything else you should be using linux or osx. Some platforms have better support for it then others, but across the board, things will be done for unix first with windows as an afterthought.

You can use Windows.

However, you may have a bit of trouble. Most of the documentation out there assumes a Unix (Mac OS X, Linux, etc.) system, so you'll have to translate instructions (compilation, paths, etc.).

You should run the same OS on your development (ie testing by developers) server(s) as you run in production. Failing to do this will result in bugs which only occur in production.

However, you can run Windows if you like, simply run the target OS in a VM; you can still use a Windows editor etc, to edit the source code. You can use a Windows SCM system, a Windows-based bug tracking system etc, it doesn't really matter.

Just run your test server on the right OS and it will all be fine.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM