Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
O

os

> 编程语言
Open source

The OS gem allows for some easy telling if you’re on windows or not. OS.windows? as well as some other helper utilities

166 stars0 likes2 views
WebsiteGitHub

About

The OS gem allows for some easy telling if you’re on windows or not. OS.windows? as well as some other helper utilities

The OS gem allows for some easy telling if you're on windows or not.

Install

bash
bundle add os

Usage

…

If there are any other features you'd like, let me know, I'll do what I can to add them :)

http://github.com/rdp/os for feedback et al

Alternatives

rubygems:

ruby
Gem::Platform.local
Gem.ruby

The reason Gem::Platform.local felt wrong to me is that it treated cygwin as windows--which for most build environments, is wrong. Hence the creation of this gem.

the facets gem (has a class similar to rubygems, above)

ruby
require 'facets/platform'
Platform.local

the "platform" gem, itself (a different gem)

ruby
FFI::Platform::OS

Contributing

Develop locally:

bash
bundle install
bundle exec guard

License

License: MIT (see LICENSE file)

Issues· 25 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Ruby

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言