How to install rails 6.0
Yet to start with rails 6.0, Install it right now and build awesome web apps.
Rails 6 comes with a lot of new features like Action Mailer, Multiple databases, parallel test and more. If you haven’t started yet with the rails 6.0 then install it right now and explore its awesome features.
If you are using ubuntu then use the following commands to install rails 6.0.
Install ruby version 2.6.2
$rvm install 2.6.2
Install rails 6.0
$gem install rails -v 6.0.0.rc1
Rails have installed now. Please create a new application using the following command.
$rails new testApp
Now change directory to newly created application’s directory.
$cd testApp
Now, Start the rail server
$rails server
If you are getting following error while starting the rails server
error: Webpacker configuration file not found
Then use the following commands to install webpacker.
$curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$echo ‘deb https://dl.yarnpkg.com/debian/ stable main’ | sudo tee /etc/apt/sources.list.d/yarn.list
$sudo apt update && sudo apt install yarn
$rails webpacker:install
Make sure all packages are up to date using the following command.
$yarn install --check-files
Now start your rails server once again and it should not throw an error.
$rails sever
Visit MGR Software, for more interesting blogs. Thank you!