You can now visit to view your new website! # config/database.yml file to contain the username/password that you specified # If you setup MySQL or Postgres with a username/password, modify the # Then, move into the application directory # or if you want to use SQLite (not recommended) # as your app, you may need to edit config/database.yml to match the # Note that this will expect a postgres user with the same username # Create a code directory at C:\code for your Rails apps to live (You only need to do this once) Do this every time you open the Linux console. Let's create your first Rails application: # Navigate to the C: drive on Windows. This is actually the C: drive on Windows and it lets you use Sublime, Atom, VS Code, etc on Windows to edit your Rails application.Īnd now for the moment of truth. The best place to develop Rails apps on the Windows Subsystem for Linux is to navigate to `/mnt/c`. When you're finished, you can skip to the Final Steps. Installing the libmysqlclient-dev gives you the necessary files to compile the mysql2 gem which is what Rails will use to connect to MySQL when you setup your Rails app.
#Ruby mine tutorial install#
sudo apt-get install mysql-server mysql-client libmysqlclient-dev This information will go into your Rails app's database.yml file in the future. As part of the installation process, you'll set the password for the root user.
![ruby mine tutorial ruby mine tutorial](https://forum.shakacode.com/uploads/default/original/2X/6/633e1ad950dfbc9226fbc2fd92eb517492245178.png)
You can install MySQL server and client from the packages in the Ubuntu repository.
![ruby mine tutorial ruby mine tutorial](https://resources.jetbrains.com/help/img/idea/2021.2/rm_get_started_vcs_git.png)
If you're coming from PHP, you may already be familiar with MySQL. If you're new to Ruby on Rails or databases in general, I strongly recommend setting up PostgreSQL. There is a lot of documentation on both, so you can just pick one that seems like you'll be more comfortable with. You'll probably want something more robust like MySQL or PostgreSQL. Chances are you won't want to use it because it's stored as a simple file on disk. Rails ships with sqlite3 as the default database.