How To Download Ruby On Rails For Mac



I'm running Mac OS X v 10.4.11 and I want to install Xcode to compile and run ruby on rails. When I go to apple site I must download latest version of Xcode which does not run on my version of OS. Udemy Ruby On Rails Developer Course 2020 ( Free Download Tutorial) The Complete Ruby on Rails Developer Course Learns to make innovative web apps with Ruby on Rails and unleash your creativity. What you’ll learn in Udemy Ruby On Rails Developer Course 2020 ( Free Download Tutorial).

  • Installing Ruby on Rails on Mac OSX Platform

Installing Ruby on Rails is one of the hardest things for a newbie to Ruby and Ruby on Rails. Rails is an open source project with lots of dependencies which makes great strength for Rails and allows it to initiate quickly, but it has the drawback of making a developer pass through lots of difficulties in installing ruby on rails, particularly for someone new to programming or new to the MAC world.

How To Download Ruby On Rails For Mac Mojave

I had to modify some of the instructions over the tutorial of installing Ruby on Rails on different Macs with different versions of OS X and XCode. Here is what worked for me on Mountain Lion and XCode 4.x.x. But first lets familiar with a couple of terms.

  • XCode is Apple’s iOS & Mac Apps development environment, but it includes some system libraries that you need for installing Ruby on Rails.
  • RVM (Ruby Version Manager) is highly recommended as it lets you manage different versions of Ruby, Rails and Gems so you can try out new versions or mimic different production environments without having to install/reinstall everything.
  • Homebrew is a package environment for OS X that can install most other missing system packages you’ll need for installing Ruby on Rails.

Installing Ruby on Rails

Installing XCode:

  • Click and install XCode from the Mac Store
  • Once installed, go to Preferences -> Downloads -> Install Command Line Tools

Please note that the next several installation commands should be run in the Terminal application.

Install Homebrew and apple-gcc42
This installs the Homebrew package manager and a GCC compiler

2
4
$ruby-e'$(curl -fsSkL raw.github.com/mxcl/homebrew/go)'
$brew install apple-gcc42

Install RVM:
In the OS X Terminal, issue the following commands:

$curl-Lhttps://get.rvm.io | bash -s stable --ruby
How To Download Ruby On Rails For Mac

Note: run the source command outputted from the above command

2
$rvm use1.9.3

The above commands install RVM, install ruby version 1.9.3, tell RVM to use the 1.9.3 version for the rest of the stuff you’ll install and set 1.9.3 to be default going forward.

Install XQuartz

How to download ruby on rails for mac mojave

NOTE: This step is optional and is only necessary if you plan to do image manipulation using ImageMagick.

Apple no longer ships an X Windowing system starting with Mountain Lion, so you’ll probably need to install the open sourced version of this available at http://xquartz.macosforge.org/landing/

High

Install Rails

Get Ready for most important step of installing Ruby on Rails. to do that you just have to type following command on terminal.

Rails should now be installed. To create a test app, run

Rails

If you get an error about OpenSSL support, you may need to update RVM. See the instructions at https://rvm.io/packages/openssl

Optional: MySQL
MySQL is a popular open source database that you may want to install locally to make sure that it behaves the same as your production instance of MySQL (if that’s what you’re running). Rails abstracts a lot of the different database differences to your app, but you still may want to actually run MySQL just to have the added confidence that there aren’t any subtle quirks/differences.

2
4
6
8
$mysql_install_db--verbose--user=`whoami`--basedir='$(brew --prefix mysql)'--datadir=/usr/local/var/mysql--tmpdir=/tmp
$mysql.serverstart
$/usr/local/opt/mysql/bin/mysqladmin-uroot password'[[[YOUR_ROOT_PASSWORD_HERE]]'

If you want to have MySQL start automatically when your Mac logs in, you can set it up like this:

2
$cp/usr/local/Cellar/mysql/5.5.27/homebrew.mxcl.mysql.plist~/Library/LaunchAgents/
$launchctl load-w~/Library/LaunchAgents/homebrew.mxcl.mysql.plist

Optional: ImageMagick

  • I had to do some basic image manipulation in my app (resizing photos, etc) and I had to install the ImageMagick package through homebrew to get it working.
2
$brew install--fresh imagemagick

How To Download Ruby On Rails For Mac Catalina

Done! I had to try a lot of combinations to get it working on my laptop. hopefully this helps as most of the online resources I found were out of date for Mountain Lion or the newest version of XCode.

For more updates on Programming visit our FB Page.

Series Navigation<< Create Ruby on Rails Project from Scratch, a beginner’s guideRuby on Rails Render Template & Pass Data to View >>

How To Download Ruby On Rails For Mac High Sierra

Bookmark Link using:

Mac

You may also like: