- Let's look at the installation instructions for Rails' Framework on Windows, Mac OS X, and Linux. Rails Installation on Windows. First, let's check to see if you already have Ruby installed. Bring up a command prompt and type C: ruby -v. If Ruby responds, and if it shows a version number at or above 1.8.6, then type C: gem -version.
- Ruby on Rails is a full-stack web framework optimized for programmer happiness and sustainable productivity. It encourages beautiful code by favoring convention over configuration.
- 3.1 Installing Rails. Open up a command line prompt. On Mac OS X open Terminal.app, on Windows choose 'Run' from your Start menu and type 'cmd.exe'. Any commands prefaced with a dollar sign $ should be run in the command line. Verify that you have a current version of Ruby installed: $ ruby -v.
When it returns to the system prompt, Ruby will be installed. But it may not be available in your terminal yet. To tell rvm to use the Ruby version you just installed, and to use this version by default in the future, run this command in your terminal: rvm use 2.3.1 -default Rails. Now it's time to install Rails. Rails comes as a Ruby 'gem'. Get the Toolbox App to download RubyMine and its future updates with ease. RubyMine is also available as a snap package. If you’re on Ubuntu 16.04 or later, you can install RubyMine from the command line. Sudo snap install rubymine -classic.
- 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.
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 |
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
NOTE: This step is optional and is only necessary if you plan to do image manipulation using ImageMagick.
Ruby On Rails Download Mac Version
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/
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
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 |
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.
Free Ruby On Rails Download
For more updates on Programming visit our FB Page.
Bookmark Link using:
You may also like:
Here you can get the latest Ruby distributions in your favorite flavor.The current stable version is 3.0.2.Please be sure to read Ruby’s License.
Ways of Installing Ruby
We have several tools on each major platform to install Ruby:
- On Linux/UNIX, you can use the package management system of yourdistribution or third-party tools (rbenv and RVM).
- On macOS machines, you can use third-party tools (rbenv and RVM).
- On Windows machines, you can use RubyInstaller.
See the Installation page for details on usingpackage management systems or third-party tools.
Of course, you can also install Ruby from source on all major platforms.
Compiling Ruby — Source Code
Installing from the source code is a great solution for when you arecomfortable enough with your platform and perhaps need specific settingsfor your environment. It’s also a good solution in the event that thereare no other premade packages for your platform.
See the Installation page for details on buildingRuby from source. If you have an issue compiling Ruby, consider usingone of the third party tools mentioned above. They may help you.
- Stable releases:
- Ruby 3.0.2
sha256: 5085dee0ad9f06996a8acec7ebea4a8735e6fac22f22e2d98c3f2bc3bef7e6f1 - Ruby 2.7.4
sha256: 3043099089608859fc8cce7f9fdccaa1f53a462457e3838ec3b25a7d609fbc5b
- Ruby 3.0.2
- In security maintenance phase (will EOL soon!):
- Ruby 2.6.8
sha256: 1807b78577bc08596a390e8a41aede37b8512190e05c133b17d0501791a8ca6d
- Ruby 2.6.8
- Not maintained anymore (EOL):
- Ruby 2.5.9
sha256: f5894e05f532b748c3347894a5efa42066fd11cc8d261d4d9788ff71da00be68
- Ruby 2.5.9
- Snapshots:
- Stable Snapshot of ruby_3_0 branch:This is a tarball of the latest snapshot of the current
ruby_3_0
branch. - Stable Snapshot of ruby_2_7 branch:This is a tarball of the latest snapshot of the current
ruby_2_7
branch. - Stable Snapshot of ruby_2_6 branch:This is a tarball of the latest snapshot of the current
ruby_2_6
branch. - Nightly Snapshot:This is a tarball of whatever is in Git, made nightly.This may contain bugs or other issues, use at your own risk!
- Stable Snapshot of ruby_3_0 branch:This is a tarball of the latest snapshot of the current
For more information about specific releases, particularly older releasesor previews, see the Releases page.Information about the current maintenance status of the variousRuby branches can be found on the Branches page.
For information about the Ruby Subversion and Git repositories, see ourRuby Core page.
The Ruby source is available from a worldwide set ofMirror Sites.Please try to use a mirror that is near you.