$ 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
$ 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
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
Recommended Posts