![]() ![]() A gem is a library, a collection of reusable code, that can be automatically downloaded and installed on your system, using the “gem” tool. 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 But it may not be available in your terminal yet. When it returns to the system prompt, Ruby will be installed. Run this command from your terminal: rvm install 2.3.1 Now that rvm is installed, we can have it install a new Ruby version for us. If it outputs usage information, you’ll know it’s working. Then, try running the “rvm” command all by itself. So go ahead and open a new window from the menu. Rvm is now installed, but it won’t be available until you open a new terminal window. It’s there to avoid potential version conflicts.) (Yes, that is a backslash before the “curl” command. rvm will download, compile, and install new Ruby versions for us.Ĭopy and paste these two commands into your terminal: gpg -keyserver hkp:// -recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 Ruby Version Manager (rvm)Īnd now we’re ready to install rvm, the Ruby Version Manager. Wait a bit, and when it returns to the command prompt, the gpg software will be installed. For security reasons, we’re going to need an encryption tool named “gpg”, so let’s install that. Now it’s time to install our first Homebrew package. ![]() When the install finishes, you’ll see the dollar sign prompt again. It’s a bit outdated, but it’s recent enough to install Homebrew for us.) (Macs actually come with a version of Ruby pre-installed. So let’s start by installing Homebrew.Ĭopy and paste this Ruby command into your terminal, then hit the Return key to run it: /usr/bin/ruby -e "$(curl -fsSL )" And Homebrew, the package manager, can automatically download and install these packages for us. Installing Rails requires several software packages. Once that’s done, you’ll be ready to follow along for the rest of these directions. If you haven’t done this before, visit your Applications folder in the Finder, then open the “Utilities” folder, and double-click the “Terminal” app. Lastly, we’ll use our newly-installed Ruby tools to install the Rails library itself.įirst, you’ll need to open a terminal.rvm will install an up-to-date version alongside your existing version. ![]() Macs already come with a version of Ruby installed, but it’s usually a little out of date. Then we’ll use “rvm”, the Ruby Version Manager, to install a new version of Ruby.We’ll use Homebrew, a software package installer, to install some libraries that both Ruby and Rails rely on.We’re not going to mess with installing a fancy database, alternate testing frameworks, or anything like that this is an easy, bare-bones installation that will let you try Rails and see if it’s right for you. We’ve set up guides for 3 different operating systems: We figured we’d share those directions here, as a little nudge to those of you who still haven’t discovered how awesome Rails is. In setting up for the Treehouse Rails 5 Basics course, we’re also updating our installation help workshops to cover Rails 5. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |