[Beginner] I stumbled upon launching a project with Rails6

Check version of ruby, install

$ ruby --version

If the version of ruby is 2.5.0 or higher, it will work. However, the latest version is faster in adding methods and processing. Now 2.7.1 seems to be the stable version.

# Install the latest ruby
$ rbenv install 2.7.1 

Launching a project with rails6

$ mkdir sample_app
$ cd sample_app

#ruby version change
$ rbenv local 2.7.1

#rails6 installation
$ gem install rails -v '6.0.0'

#DB is changing to PostgreSQL
$ rails _6.0.0_ new -d postgresql

$rails s

Stumble point

Normally it will start up with the above, but when using rails 6 for the first time

$ rails s

=> Booting Puma
=> Rails 6.0.0.rc2 application starting in development 
=> Run `rails server --help` for more startup options

RAILS_ENV=development environment is not defined in config/webpacker.yml, falling back to production environment
Exiting
...
/home/ubuntu/.rvm/gems/ruby-2.6.3/gems/webpacker-4.0.7/lib/webpacker/configuration.rb:91:in `rescue in load': Webpacker configuration file not found /home/ubuntu/environment/test-app1/config/webpacker.yml. 
Please run rails webpacker:install Error: No such file or directory @ rb_sysopen - /home/ubuntu/environment/test-app1/config/webpacker.yml (RuntimeError)

I get this error. This is an error that webpacker could not be installed

$ rails webpacker:install 

If you do, it will be solved. again,

$ rails s

If you carry out

スクリーンショット 2020-07-26 11.45.52.png

Recommended Posts

[Beginner] I stumbled upon launching a project with Rails6
[Rails 5] Create a new app with Rails [Beginner]
I made a LINE bot with Rails + heroku
I made a portfolio with Ruby On Rails
[Beginner] I stumbled upon launching a project with Rails6
Note that I stumbled upon building the Rails environment
What I stumbled upon when installing Ruby on Ubuntu
What I stumbled upon in the ActiveModel :: Serializer test
Note that I stumbled upon building the Rails environment
I tried Rails beginner [Chapter 2]
I came across a guy with two dots in Rails
[Rails] I made a simple calendar mini app with customized specifications.
Create a Maven project with a command
I tried to make a group function (bulletin board) with Rails
I built a rails environment with docker and mysql, but I got stuck
[Spring Boot] I stumbled upon a method call count test (Spock framework)
I tried playing with BottomNavigationView a little ①
I made a rock-paper-scissors app with kotlin
I made a rock-paper-scissors app with android
I want to play with Firestore from Rails
Add a project in any folder with Gradle
I tried to break a block with java (1)
[Rails] I want to load CSS with webpacker
[Azure] I tried to create a Java application for free ~ Connect with FTP ~ [Beginner]