If you don’t yet have Ruby installed on your machine, I recommend installing Ruby with rbenv (a Ruby version and installation manager) as explained in this guide. Note: you’ll do this through an Ubuntu terminal, accessed by launching the Ubuntu app from your Windows start menu Once it’s installed, you’ll also have access to a tool called pgAdmin - a graphical user interface (GUI) for any databases you’ll create in Rails, so it’s very handy - especially if you don’t have much direct experience with databases just yet. Be sure to store the username and password you enter somewhere secure so you remember it. PostgreSQL for Windows takes some time to download, so a wait-time of a few minutes is normal. It looks possible to install PostgreSQL that way (see this post), but I ran into issues trying to connect Rails and PostgreSQL while using apt-get. I opted to install PostgreSQL this way instead of trying to install PostgreSQL in the Ubuntu subsystem using apt-get (a command-line tool for installing software packages). Keep an eye out for the link to “Download the installer” at the top of the page. I used this PostgreSQL for Windows Installer to install PostgreSQL onto my computer. (Note: you’ll need to sign up for Windows Insider, but it’s free and took just a few minutes for me to do.) Here's the link to the Microsoft documentation on how to install the Windows Subsystem for Linux and install the Ubuntu app which is used to access it. The main benefit of using the WSL is that we can 1) use Linux command-line tools and applications and 2) avoid the potential headache of navigating through Windows Powershell. The Windows Subsystem for Linux (or WSL) allows developers to run a Linux environment directly from Windows, while Ubuntu is an operating system that’s based on Linux. Install Ubuntu on the Windows Subsystem for Linux (WSL)įirst things first, let’s define a few key things. So without further ado, here’s how we were able to get Rails successfully installed on Windows:ġ. Well, it turned out to be quite a confusing process, but after much head-scratching and jumping through many Google search hoops, I’m happy to report that we succeeded in getting everything up and running. The only problem? I was stuck with my personal Windows computer while waiting for a company MacBook to be shipped to me.Īlas, my first challenge: Getting Rails 6 and PostgreSQL working on Windows. It ensures that the packages received aren’t spoofed.During my first week as a Junior Software Engineer with the Orbit team, I had many things to do to get into the overall swing of things, and one of the most important tasks was getting our Rails application set up on my local machine. We need the RVM GPG keys to verify packages. The script is designed to auto-detect the Linux system, then download and install all necessary packages. The installation process of RVM is pretty straightforward, thanks to the installation script RVM offers. Here is a tutorial that details the steps of Installing Ruby on Rails with RVM on Ubuntu.Īs for PostgreSQL, take a look at this quick guide on installing and configuring PostgreSQL on Ubuntu. It can also manage multiple versions of Ruby and switch seamlessly between them. The benefit of this approach is that RVM will create a local installation of Ruby on Rails. It’s a dedicated tool to manage Ruby on Rails installations. They should be available from the default package servers.Īn alternative method is using RVM (Ruby Version Manager). Ruby on Rails and PostgreSQLīoth PostgreSQL and Ruby on Rails are available on any UNIX/Linux distribution. This tutorial will guide you through the process of configuring PostgreSQL for your Ruby on Rails application. However, it also supports PostgreSQL integration. By default, Rails assume SQL for database functionalities. It’s a database-agnostic framework, meaning it can work with a wide variety of databases. Ruby on Rails is a popular web framework written in Ruby. Similar to its competitors MySQL and SQLite, PostgreSQL also has its strong and weak points. Because PostgreSQL is a popular choice, it’s supported by almost all major web frameworks. It’s a well-known open-source database system known for its reliability, robust features, and performance. Among all the available database engines, PostgreSQL is one of the most popular ones.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |