Thursday, 19 August 2021

How to Update a Project Rails ('rails', '5.2.5') to 'rails', '6.1.4'

 Follow some basic step to update rails version

1. Go to the Gemfile and replace older rails version to new rails version Like 

    gem 'rails', '5.2.5' gem 'rails', '6.1.4'

    
    gem 'pg', '< 1.0.0' gem 'pg'

    ruby '2.7.1'

2.  After that Run bundle install

3. after that run this:- raile app:update 

 => when we run this cmd I have to keep the changes of these all files which are given below :-

  • bin/setup
  • bin/yarn
  • config.ru
  • config/environments/development.rb
  • config/environments/production.rb
  • config/environments/test.rb
  • config/initializers/content_security_policy.rb
  • config/initializers/new_framework_defaults_6_1.rb
  • config/initializers/permissions_policy.rb
  • db/schema.rb     
4. In this file Dockerfile.dev  FROM ruby:2.6.7 FROM ruby:2.7.1

5. In this file Dockerfile.prod

    FROM ruby:2.6.7-alpine as Builder FROM ruby:2.7.1-alpine as Builder

RUN gem install bundler:2.2.16 RUN gem install bundler:2.2.26

FROM ruby:2.6.7-alpine FROM ruby:2.7.1-alpine


go to this Url for reference :- https://github.com/pmdgithub/auth/pull/202/files

  Common Git Commands   Take clone of a repository git clone <remote-repository-url> ex: git clone  https://github.com/agricor/RegTech...