← Back to Ruby Course | Chapter 1: Setup & Basics | Lesson 2 of 7

Ruby इंस्टॉल करना

Ruby install करना एक video play करने से पहले player पाने जैसा है। आपके computer को Ruby install करना ज़रूरी है ताकि यह Ruby programs समझ और चला सके।

Ruby Install करना

कोई भी Ruby script चलाने से पहले Ruby को install होना ज़रूरी है, और यह Linux, macOS, और Windows पर विभिन्न installers के जरिए available है।

ज़्यादातर developers एक single system-wide install की बजाय प्रति project Ruby versions के बीच switch करने के लिए rbenv या rvm जैसा एक version manager इस्तेमाल करते हैं। apt, brew, और choco जैसे Package managers भी direct installs देते हैं।

Note: install करने के बाद यह confirm करने के लिए ruby -v चलाएँ कि interpreter आपके PATH पर है।

उदाहरण: Installing Ruby

bash
# Linux (Ubuntu/Debian)
sudo apt-get update && sudo apt-get install -y ruby-full

# macOS (Homebrew)
brew install ruby

# Windows (Chocolatey)
choco install ruby

# Verify installation (all platforms)
ruby -v

⚠️ Run this in your own terminal or Node.js environment.

Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the view already swaps in the hi_ translation fields (or blanks these out if untranslated), so this renders correctly for both languages without a lang_code check here. #}
आम गलतियां
  1. macOS पर projects के लिए system Ruby इस्तेमाल करना, जो old है और permissions चाहता है; rbenv या Homebrew Ruby जैसा एक version manager safer है।
  2. sudo gem install से एक gem install करना, जो बाद में permission problems cause कर सकता है।
  3. install करने के बाद ruby -v skip करना, इसलिए एक गलत या missing PATH सिर्फ तब मिलता है जब एक script fail हो।
🔒

Chapter Quiz — Complete all 7 topics to unlock

0/7 topics done

Complete these topics first:

Login to run this code

C/C++/Java/PHP execution requires a free account. Your code is saved — you'll land right back in the editor after logging in.