-
Notifications
You must be signed in to change notification settings - Fork 3
installing rails
Last updated 24 October 2013
Installing Ruby on Rails 4.0 on Mac OS X, Ubuntu, or Windows. Up-to-date, detailed instructions on how to install Rails newest release. 4.0.0 is the newest version of Rails.
These installation guides are used by professional developers to configure their working environment for real-world Rails development.
This article describes installing Ruby on your personal computer or using a hosted development environment (“in the cloud”). Links are provided to in-depth installation guides for each major operating system.
New to Rails? Get the book Learn Ruby on Rails.
This is an article from the RailsApps project. The RailsApps project provides example applications that developers use as starter apps. Hundreds of developers use the apps, report problems as they arise, and propose solutions. Rails changes frequently; each application is known to work and serves as your personal “reference implementation” so you can stay up to date. Each is accompanied by a tutorial so there is no mystery code. Support for the project, including the example applications and the Rails Composer tool, comes from subscribers to the RailsApps tutorials.
See the article Updating Rails if you already have Rails installed.
To stay informed of new releases, subscribe to Peter Cooper’s Ruby Weekly newsletter and follow @ruby_news and @rails_apps on Twitter.
Rails 4.0 was released June 25, 2013. The Rails 4.0: Beta 1 release announcement offers an overview of new features.
You can learn more about Rails 4.0:
- Ebook: Andy Lindeman Upgrading to Rails 4
- Ebook: Philip De Smedt Upgrade to Rails 4
- Blog post: Maciej Mensfeld Upgrading to Rails 4.0 from Rails 3.2
- Blog post: Mario Chavez Upgrading a Rails application to 4.0
- Script: Michael de Silva upgrade_rails_3.2.12_to_4.0.0.beta1
- Video: Code School Rails 4: Zombie Outlaws
- Article: RailsGuides Upgrading from Rails 3.2 to Rails 4.0 (work-in-progress document)
The railsdiff.org site shows differences between versions of the Rails default application. You can follow the progress of Rails development on the EdgeRails.info site.
What You Need to Know: Rails 4.0.0 is the newest release. Start new projects with Rails 4.0 and begin upgrading older projects now. The biggest changes are the use of strong parameters, which requires rewriting controller methods that process forms, and Turbolinks, which requires rewriting JavaScript code that depends on page loading. For advice about migrating an application from Rails 3.2 to Rails 4.0, see the article Updating Rails. Use the website ready4rails4.net/ to find if the gems you need are ready for Rails 4.0.
Rails 4.0.0 was released June 25, 2013. See Rails 4.0: Final version released.
For an overview of earlier releases, see a Ruby on Rails Release History.
Upgrade to Mac OS X Mavericks (10.9) before installing Ruby. Mac OS X comes with a “system Ruby” pre-installed. Mac OS X Mavericks includes the current Ruby version Ruby 2.0.0p247. However, for flexibility during development, don’t use the system Ruby. Instead, install Ruby using RVM, the Ruby Version Manager.
See this article for complete instructions:
Install Ruby on Rails – Mac OS X Mavericks
Before installing Ruby, you’ll need to prepare your computer by installing Apple’s Xcode Command Line Tools.
What You Need to Know: Upgrade to Mac OS X Mavericks and install Apple’s Xcode Command Line Tools. Then use RVM to install Ruby.
On Ubuntu, package managers are available to install Ruby. For Ubuntu Linux, it is best to install RVM, the Ruby Version Manager, to install Ruby and Rails. The package managers are often not up to date. Use RVM instead.
Since Rails 3.1, a JavaScript runtime has been needed for development on Ubuntu Linux (it is not needed for Mac OS X or Windows). For development on Ubuntu Linux it is best to install the Node.js server-side JavaScript environment.
See this article for complete instructions:
Install Ruby on Rails – Ubuntu
What You Need to Know: Use RVM to install Ruby and Rails. And install a JavaScript runtime.
Nitrous.io provides a “hosted development environment.” That means the service provides a computer you use from your web browser. Accounts are free for small projects.
The web interface includes a browser-based file manager and text editor, plus a Unix shell with Ruby and Rails pre-installed. Any computer can access the hosted development environment, though you’ll need a broadband connection.
See this article for complete instructions:
Install Ruby on Rails – Nitrous.io
What You Need to Know: Use Nitrous.io if you don’t want to install Ruby on your computer.
Developing with Rails on Windows can be painful. Some gems requiring native extensions may be difficult to install. For this reason, most developers use Mac OS X or Ubuntu to develop Rails applications.
Here are your choices for Windows:
- Use the Nitrous.io hosted development environment
- Install the Railsbridge Virtual Machine or rails-dev-box
- Use RailsInstaller for Windows as documented in Installing Rails on Windows
Nitrous.io is ideal if you have a fast Internet connection. If not, download the Railsbridge Virtual Machine or rails-dev-box for a virtual Linux computer with Ruby 2.0 and Rails 4.0 using Vagrant. The last option, RailsInstaller, is not recommended because it does not provide an up-to-date version of Ruby or Rails. Also, RVM does not run on Windows.
What You Need to Know: Use Nitrous.io, the Railsbridge Virtual Machine, or switch to Mac OS X or Ubuntu Linux if you can.
Your best source for help with problems is Stack Overflow. Your issue may have been encountered and addressed by others.
You can also try Rails Hotline, a free telephone hotline for Rails help staffed by volunteers.