How to make an application with ruby on rails (assuming that the environment has been built)

In the terminal, select the directory you want to create the application with "cd ~". rails _ 6.0.0 _ new (name of the application you want to create) -d If you enter mysql and "Webpacker successfully installed" is displayed after many "create ~" are displayed, it is successful. rails new is a command that rails, a ruby framework, creates a set of files required for a web application.

If you get an error, 「bundle config --delete build.mysql2」 「bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"」 "Cd ~ (created app name)" I think it's okay if you type "bundle install" in order.

If you enter cd (name of the created app), you can move to the directory of that app and add a library.

After that, I think that "encoding: utf8mb4" is described in about the 14th line of config / database.yml of (created application name) with VS Code etc. Delete "mb4" of "utf8 mb4" and change it to "encoding: utf8". Go to the terminal and type rails db: create "Created database'(created app name) _development'" I think that two of "Created database'(created application name) _test'" are displayed. After entering rails s, enter "localhost 3000" on the web, and if you see an illustration of people from all over the world on the earth under "Yay! You're on Rails!", You are successful.

Since I am a beginner, I would appreciate it if you could point out any mistakes.

Recommended Posts

How to make an application with ruby on rails (assuming that the environment has been built)
How to build an environment with Docker, which is the minimum required to start a Rails application
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
How to solve the local environment construction of Ruby on Rails (MAC)!
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
[Rails] How to build an environment with Docker
[Ruby on Rails] How to make the link destination part of the specified id
How to resolve errors that occur in the "Ruby on Rails" integration test
How to make an almost static page with rails
[Ruby on Rails] How to change the column name
How to install Docker in the local environment of an existing Rails application [Rails 6 / MySQL 8]
[Ruby On Rails] How to use simple_format to display the entered text with line breaks
How to use Ruby on Rails
[Ruby On Rails] How to update the calculated result to an integer type column using update_column
Ruby on Rails --From environment construction to simple application development on WSL2
[Rails / Heroku / MySQL] How to reset the DB of Rails application on Heroku
Steps to build a Ruby on Rails development environment with Vagrant
After learning Progate, I tried to make an SNS application using Rails in the local environment
[Ruby on Rails] How to use CarrierWave
How to publish an application on Heroku
[Ruby on Rails] How to use redirect_to
[Ruby on Rails] How to use kaminari
How to build Rails 6 environment with Docker
How to build a Ruby on Rails environment using Docker (for Docker beginners)
How to debug the processing in the Ruby on Rails model only on the console
[Ruby On Rails] How to search the contents of params using include?
[Ruby on Rails] How to log in with only your name and password using the gem devise
[Ruby on Rails] How to display error messages
How to add / remove Ruby on Rails columns
Publish the app made with ruby on rails
Rails6.0 ~ How to create an eco-friendly development environment
[Ruby on Rails] Let's build an environment on mac
Determine the current page with Ruby on Rails
[Ruby on Rails] How to install Bootstrap in Rails
[Ruby on Rails] How to use session method
[Ruby on Rails] Rails tutorial Chapter 14 Summary of how to implement the status feed
[Rails] How to operate the helper method used in the main application with Administrate
[Ruby on Rails] How to Japaneseize the error message of Form object (ActiveModel)
How to install Ruby on an EC2 instance on AWS
[Introduction] Try to create a Ruby on Rails application
[Ruby On Rails] Description that allows only specific users to transition to the edit page
[Ruby on Rails] How to write enum in Japanese
How to make LINE messaging function made with Ruby
[Ruby On Rails / HTML] How to display the cursor (caret) at an appropriate place when displaying a web page
How to delete a new_record object built with Rails
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (5)
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (6)
How to use git with the power of jgit in an environment without git commands
Deploy to Ruby on Rails Elastic beanstalk (Environment construction)
How to request by passing an array to the query with HTTP Client of Ruby
[Ruby On Rails] How to reset DB in Heroku
How to check the WEB application created in the PC development environment on your smartphone
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (3)
Solve the N + 1 problem with Ruby on Rails: acts-as-taggable-on
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (2)
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (1)
[Rough explanation] How to separate the operation of the production environment and the development environment with Rails
Addicted to the webpacker that comes standard with Rails 6
[Rails AWS Docker] Build an existing Ruby on Rails + MySQL application with Docker and deploy it on AWS (4)
(Ruby on Rails6) How to create models and tables
[Rails] How to display an image in the view