# Creating an All New Rails App

DevFeed: [Creating an All New Rails App](<https://devfeed.tech/articles/creating-an-all-new-rails-app-28252.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/rails/2020/01/09/creating-an-all-new-rails-app.html>)

Author: Fuzzygroup

Published: 2020-01-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Ruby on Rails](<https://devfeed.tech/topics/ruby-on-rails.md>), [cURL](<https://devfeed.tech/topics/curl.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [cd](<https://devfeed.tech/tags/cd.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [config](<https://devfeed.tech/tags/config.md>), [console](<https://devfeed.tech/tags/console.md>), [curl](<https://devfeed.tech/tags/curl.md>), [database](<https://devfeed.tech/tags/database.md>), [directory](<https://devfeed.tech/tags/directory.md>), [git](<https://devfeed.tech/tags/git.md>), [history](<https://devfeed.tech/tags/history.md>), [install](<https://devfeed.tech/tags/install.md>), [localhost](<https://devfeed.tech/tags/localhost.md>), [migrate](<https://devfeed.tech/tags/migrate.md>), [mysql](<https://devfeed.tech/tags/mysql.md>), [password](<https://devfeed.tech/tags/password.md>), [pwd](<https://devfeed.tech/tags/pwd.md>), [rails](<https://devfeed.tech/tags/rails.md>), [ruby](<https://devfeed.tech/tags/ruby.md>), [server](<https://devfeed.tech/tags/server.md>), [terminal](<https://devfeed.tech/tags/terminal.md>)

## AI overview

The post gives a command-by-command setup for a new Rails app using Ruby 2.7.0 and MySQL: create the app, install gems, configure database credentials, create and migrate the database, and run the server on port 3096. It recommends keeping the web server, Rails console, and other commands in three terminal panes or tabs, then installing Yarn and adding it to the app. The author says the initial server errors should then be gone and treats generating a Project model as a final check that the app is set up correctly. The excerpt ends at the model-generation step.

## Source excerpt

I have been mentoring a person new to Rails for the past several weeks and it is always instructive to see where someone new to the platform has issues. This blog post walks through the commands we used today and explains them. If you're an old hat at this, just move on but if you're starting out, I suspect this may be quite helpful. Navigate to the Right Starting Directory cd /Users/sjohnson/Sync/coding/rails/ Make Sure Rails is Ok rails --version Set the Ruby Version rvm use 2.7.0 Find a Rails New Command from my History history | grep 'rails new' Create a New Rails App rails new dev_home_page --database=mysql Change Into The Directory cd dev_home_page Run Bundle Install bundle install Start a Web Server bundle exec rails s -p3096 Open the web server in your browser with: http://localhost:3096/ Close Web Server with Ctrl+C and Edit config/database.yml mate config/database.yml You need to set the user and password on your database server in the first configuration block within the database.yml file. Create the Database Itself bundle exec rake db:create Run rake db:migrate bundle exec rake db:migrate Start Two More Terminal Panes I run iTerm and I'm a firm believer in the "The Trininty of Terminal Windows for Rails Development" so I right click in my terminal window and select Split Pane Horizontally twice giving me 3 terminal windows in one. I then go back to my first terminal window and get the current directory. Note 1: The trinity of terminal windows is Web Server, Rails Console and a Command Line for git commits / whatever else. Note 2: The same result can be done with 3 tabs in standard OSX Terminal. I just adore iTerm; it has made my life better. Note 3: Start your Rails Console in the middle pane with: bundle exec rails c Get the Current Directory and Set all Terminal Panes to this Directory pwd and then in each other terminal pane, do: cd /Users/sjohnson/Sync/coding/rails/dev_home_page This is the directory that pwd displayed or you. Install Yarn curl -o- -