Downgrade an existing app created with rails 5.2.4 to 5.1.6

I was developing with rails 5.2.4, but I chose to downgrade because I wanted to manage the existing service and version together. Since the environment is built with docker, it is necessary to change the version of rails such as the PC you are using if it is local.

procedure

1. Rewrite rails version of Gemfile

Gemfile


gem "rails", "5.1.6"

2.bundle update (docker service name is web)

$ docker-compose run web bundle update

3. Rewrite config

Since config.load_defaults of application.rb is 5.2, change it to 5.1

application.rb


 config.load_defaults 5.1

4. Unset Active Record

Removed active_storage line in application.js

application.js


//=require active_storage

Removed active_storage line in config

production.rb


config.active_storage.service = :local

development.rb


config.active_storage.service = :local

5. Create secrets.yml

Create secrets.yml under config and create a key with bundle exec rake secret.

Reference article https://qiita.com/tanishilove/items/2801059830e5af1262d7

6. Finally, delete the Active_storage setting that remains in development.rb

Change config.active_record.verbose_query_logs to false

development.rb


config.active_record.verbose_query_logs = false

Finally

I don't think there are many opportunities to lower the version, but I hope it will be helpful in case of trouble.

Recommended Posts

Downgrade an existing app created with rails 5.2.4 to 5.1.6
Introduced Vue.js to an existing Rails app
Introduced Vuetify to an existing Rails app
How to push an app developed with Rails to Github
I want to push an app made with Rails 6 to GitHub
How to specify db when creating an app with rails
rails new app is not created with app name
[Rails] How to build an environment with Docker
How to make an almost static page with rails
Rails6 I tried to introduce Docker to an existing application
How to get started with creating a Rails app
How to connect a container created later to an existing network
Rough procedure verbalized output when creating an app with Rails
[Rails] I tried to create a mini app with FullCalendar
What to do when you launch an application with rails
Summary of initial work when creating an app with Rails
How to make an app using Tensorflow with Android Studio
Create an app with Spring Boot 2
Create an app with Spring Boot
Track Rails app errors with Sentry
Connect to Rails server with iPhone
How to get along with Rails
Introducing React to Rails with react-rails
I want to convert an array to Active Record Relation with Rails
[Rails] A memo that created an advanced search form with ransack
What to do if the app is not created with the latest Rails version installed when rails new
How to crop an image with libGDX
How to change app name in rails
I tried to introduce CircleCI 2.0 to Rails app
[Rails6] Create a new app with Rails [Beginner]
I want to make an ios.android app
[Rails] How to use rails console with docker
I made an app to scribble with PencilKit on a PDF file
Migrate existing Rails 6 apps to Docker environment
Deploy to heroku with Docker (Rails 6, MySQL)
Upload Rails app image file to S3
Try deploying Rails app to EC2-Part 2 (Deploy)-
[Rails 5] Create a new app with Rails [Beginner]
[AWS] Publish rails app with nginx + puma
Add scripts to distributions created with gradle
Let's make an error screen with Rails
[Rails] How to apply the CSS used in the main app with Administrate
How to make an app with a plugin mechanism [C # and Java]
How to build Rails 6 environment with Docker
The story of making an electronic New Year's card app with Vue.js + Rails
How to deploy a system created with Java (Wicket-Spring boot) to an on-campus server
Rails6 I want to make an array of values with a check box
I'm making an Android app and I'm stuck with errors and how to solve it
[Rails] rails new to create a database with PostgreSQL
Deploy Java web app to Azure with maven
How to output CSV created by Rails to S3
Publish the app made with ruby on rails
[Swift] How to link the app with Firebase
Deploy Rails to ECS Fargate with AWS Copilot
Create an app by specifying the Rails version
One way to redirect_to with parameters in rails
Rails6.0 ~ How to create an eco-friendly development environment
I want to play with Firestore from Rails
Rails development environment created with VSCode and devcontainer
[Rails] How to easily implement numbers with pull-down
How to build API with GraphQL and Rails