We cover:

  • Installing Ruby, RubyGems, SQLite 3, and Rails
  • Development environments and tools

Chapter 1
Installing Rails

In Part I of this book, we’ll introduce you to both the Ruby language and the Rails framework. But we can’t get anywhere until you’ve installed both and verified that they’re operating correctly.

To get Rails running on your system, you need the following:

  • A Ruby interpreter. Rails is written in Ruby, and you’ll be writing your applications in Ruby too. Rails 6 will run on Ruby version 2.5 and 2.6. It won’t work on prior versions of Ruby.

  • Ruby on Rails. This book was written using Rails version 6 (specifically, Rails 6.0.1).

  • A JavaScript interpreter. Both Microsoft Windows and macOS have JavaScript interpreters built in, and Rails will use the version already on your system. On other operating systems, you may need to install a JavaScript interpreter separately.

  • Some libraries, depending on the operating system.

  • A database. We’re using SQLite 3 in this book.

To be able to run and debug some of the more advanced JavaScript portions of this book, you will need two additional things: Yarn, which is a package manager for JavaScript, and ChromeDriver, which is a tool for automated testing of web applications.

For a development machine, that’s about all you’ll need (apart from an editor, and we’ll talk about editors separately). However, if you’re going to deploy your application, you’ll also need to install a production web server (as a minimum) along with some support code to let Rails run efficiently.

You can also install everything in a virtual machine. This can be good to isolate your Rails environment from your actual computer, though it will require a fair amount of disk space.

So how do you get all this installed? It depends on your choice of development environment. We’ll go over three common choices: Windows, macOS, and Ubuntu Linux. For the Linux option, we’ll show setup for using a virtual machine running Linux, so this is the version you want if you want complete isolation of your Rails development environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.67.177