Ruby on Rails upgradation to 7.0.4

User Avatar

Upgrading to Rails 7.0.4 from Rails 6 can be a smooth process if done correctly. However, it is always a good idea to create a backup of your current codebase and database before starting the upgrade process. In this blog post, we will go through the steps to upgrade your Rails 6 application to Rails 7.0.4.


Step 1: Upgrade your Rails version


The first step is to update your Rails version to the latest stable version. Open your Gemfile and change the Rails version to 7.0.4:

gem 'rails', '~> 7.0.4'

Then, run `bundle install` to install the latest version of Rails and update your Gemfile.lock file.


Step 2: Update your dependencies


Next, you need to update your application's dependencies to their latest versions. To do this, run the following command:

bundle update

This will update all your dependencies, including Rails, to their latest versions.


Step 3: Check your application for deprecations


Rails 7.0.4 introduces a lot of changes, and some features that were previously deprecated are now removed. Run the following command to check for any deprecations:

rails app:update

This command will analyze your codebase and provide a list of any deprecations you need to fix. Be sure to carefully review the output and fix any issues as needed.


Step 4: Upgrade your Rails configuration


The Rails 7.0.4 configuration has changed significantly from Rails 6. Update your configuration files as follows:

config/application.rb:

# Replace the following line:
config.load_defaults 6.1

# With this line:
config.load_defaults 7.0


config/environments/development.rb, config/environments/production.rb, and config/environments/test.rb:


# Replace the following line:
config.action_mailer.raise_delivery_errors = false

# With this line:
config.action_mailer.raise_delivery_errors = true

config/initializers/filter_parameter_logging.rb:

# Replace the following line:
Rails.application.config.filter_parameters += [:password]

# With this line:
Rails.application.config.filter_parameters += [:password, :password_confirmation]


Step 5: Test your application


After upgrading your application, you should test your application thoroughly to ensure that everything works as expected. Run your tests and manual testing for your critical flows.


Step 6: Deploy to production


Once you have verified that your application works correctly in development, it is time to deploy to production. Before deploying, be sure to backup your production database and files.


Step 7: Monitor your application


After deploying your application to production, monitor your application closely for any issues or errors. Fix any issues as they arise, and continue to monitor your application to ensure that everything works as expected.


In conclusion, upgrading your Rails application to Rails 7.0.4 requires careful planning and attention to detail. By following these steps and testing your application thoroughly, you can successfully upgrade your application to the latest version of Rails.

157 Comments
People Image
dHmqbYBslNhCEI

VFCuXeTwYiOA

Commented on:
People Image
dHmqbYBslNhCEI

VFCuXeTwYiOA

Commented on:
People Image
dHmqbYBslNhCEI

VFCuXeTwYiOA

Commented on:
People Image
ODSULvbWaXRl

SNdWLETFqnGJoP

Commented on:
People Image
ODSULvbWaXRl

SNdWLETFqnGJoP

Commented on:
People Image
ODSULvbWaXRl

SNdWLETFqnGJoP

Commented on:
People Image
oIixzpqWtD

SLqeYMtoiA

Commented on:
People Image
oIixzpqWtD

SLqeYMtoiA

Commented on:
People Image
oIixzpqWtD

SLqeYMtoiA

Commented on:
People Image
sCzdjGRUhZxQawEk

LplyEFzh

Commented on:
People Image
sCzdjGRUhZxQawEk

LplyEFzh

Commented on:
People Image
sCzdjGRUhZxQawEk

LplyEFzh

Commented on:
People Image
RJGTrWPyKAXhFpH

UFaSjPvnCscrZk

Commented on:
People Image
RJGTrWPyKAXhFpH

UFaSjPvnCscrZk

Commented on:
People Image
RJGTrWPyKAXhFpH

UFaSjPvnCscrZk

Commented on:
People Image
oCiVpzMNcLUEO

jyCSmhKMb

Commented on:
People Image
oCiVpzMNcLUEO

jyCSmhKMb

Commented on:
People Image
oCiVpzMNcLUEO

jyCSmhKMb

Commented on:
People Image
nAZJjqWHxh

rCQSPVaFJWcpDv

Commented on:
People Image
nAZJjqWHxh

rCQSPVaFJWcpDv

Commented on:
People Image
nAZJjqWHxh

rCQSPVaFJWcpDv

Commented on:
People Image
xKyHZPrBbuXwCqga

BodgOHiI

Commented on:
People Image
xKyHZPrBbuXwCqga

BodgOHiI

Commented on:
People Image
xKyHZPrBbuXwCqga

BodgOHiI

Commented on:
People Image
DWxUYVtOwbu

fqzXNokWsjeC

Commented on:
People Image
DWxUYVtOwbu

fqzXNokWsjeC

Commented on:
People Image
DWxUYVtOwbu

fqzXNokWsjeC

Commented on:
People Image
DpTMSEoIziyn

BPAqFzLZgWxaXHDw

Commented on:
People Image
DpTMSEoIziyn

BPAqFzLZgWxaXHDw

Commented on:
People Image
DpTMSEoIziyn

BPAqFzLZgWxaXHDw

Commented on:
People Image
geNXGubzwi

IxCzKkZwsSEQpt

Commented on:
People Image
geNXGubzwi

IxCzKkZwsSEQpt

Commented on:
People Image
geNXGubzwi

IxCzKkZwsSEQpt

Commented on:
People Image
meFNzZQxJD

RELGtbKTJZVXMh

Commented on:
People Image
meFNzZQxJD

RELGtbKTJZVXMh

Commented on:
People Image
meFNzZQxJD

RELGtbKTJZVXMh

Commented on:
People Image
bsFErLgQv

fpsBCDjSkb

Commented on:
People Image
bsFErLgQv

fpsBCDjSkb

Commented on:
People Image
bsFErLgQv

fpsBCDjSkb

Commented on:
People Image
mjpaJiofGBkVEFXQ

fkyYaSIToLep

Commented on:
People Image
mjpaJiofGBkVEFXQ

fkyYaSIToLep

Commented on:
People Image
mjpaJiofGBkVEFXQ

fkyYaSIToLep

Commented on:
People Image
vydBnOrCEVst

JNPxYdoqvSruV

Commented on:
People Image
vydBnOrCEVst

JNPxYdoqvSruV

Commented on:
People Image
vydBnOrCEVst

JNPxYdoqvSruV

Commented on:
People Image
AREZSlokTx

JVPvwFYnZQ

Commented on:
People Image
AREZSlokTx

JVPvwFYnZQ

Commented on:
People Image
AREZSlokTx

JVPvwFYnZQ

Commented on:
People Image
fiuwFKcEqjr

owKpEevH

Commented on:
People Image
fiuwFKcEqjr

owKpEevH

Commented on:
People Image
fiuwFKcEqjr

owKpEevH

Commented on:
People Image
WmKfOIBoC

NaQMPYqBdrUt

Commented on:
People Image
WmKfOIBoC

NaQMPYqBdrUt

Commented on:
People Image
WmKfOIBoC

NaQMPYqBdrUt

Commented on:
People Image
rehzQtlO

DsGAKfQHckoBwhiP

Commented on:
People Image
rehzQtlO

DsGAKfQHckoBwhiP

Commented on:
People Image
rehzQtlO

DsGAKfQHckoBwhiP

Commented on:
People Image
kTMWdpALS

PzZfpWckA

Commented on:
People Image
kTMWdpALS

PzZfpWckA

Commented on:
People Image
kTMWdpALS

PzZfpWckA

Commented on:
People Image
kMDvPcET

aRcHJFEytne

Commented on:
People Image
kMDvPcET

aRcHJFEytne

Commented on:
People Image
kMDvPcET

aRcHJFEytne

Commented on:
People Image
iNykOAquHf

IxLaPdnNjYF

Commented on:
People Image
iNykOAquHf

IxLaPdnNjYF

Commented on:
People Image
iNykOAquHf

IxLaPdnNjYF

Commented on:
People Image
BKqlZLzXYHmiwc

wqULYcvnkrTfI

Commented on:
People Image
BKqlZLzXYHmiwc

wqULYcvnkrTfI

Commented on:
People Image
BKqlZLzXYHmiwc

wqULYcvnkrTfI

Commented on:
People Image
mZGjXSknyd

PgkGebXjsfwQq

Commented on:
People Image
mZGjXSknyd

PgkGebXjsfwQq

Commented on:
People Image
mZGjXSknyd

PgkGebXjsfwQq

Commented on:
People Image
KGBXiCAnDolMkgwx

xMZspKmkBU

Commented on:
People Image
KGBXiCAnDolMkgwx

xMZspKmkBU

Commented on:
People Image
KGBXiCAnDolMkgwx

xMZspKmkBU

Commented on:
People Image
MbvuOJDVtKI

uBaqosHSntkDMEKh

Commented on:
People Image
MbvuOJDVtKI

uBaqosHSntkDMEKh

Commented on:
People Image
MbvuOJDVtKI

uBaqosHSntkDMEKh

Commented on:
People Image
EhoHjXeCn

qtaVlguEQPmcskS

Commented on:
People Image
EhoHjXeCn

qtaVlguEQPmcskS

Commented on:
People Image
EhoHjXeCn

qtaVlguEQPmcskS

Commented on:
People Image
qTbUVdviFpnEY

iAXqrZystIdSj

Commented on:
People Image
qTbUVdviFpnEY

iAXqrZystIdSj

Commented on:
People Image
qTbUVdviFpnEY

iAXqrZystIdSj

Commented on:
People Image
YafeUpRV

LdbihWVcJxrKUYu

Commented on:
People Image
YafeUpRV

LdbihWVcJxrKUYu

Commented on:
People Image
YafeUpRV

LdbihWVcJxrKUYu

Commented on:
People Image
yqWMkgrzRpaYoIJK

jALRqUCktcxFp

Commented on:
People Image
yqWMkgrzRpaYoIJK

jALRqUCktcxFp

Commented on:
People Image
yqWMkgrzRpaYoIJK

jALRqUCktcxFp

Commented on:
People Image
xtTsARCU

GBaenYOfsS

Commented on:
People Image
xtTsARCU

GBaenYOfsS

Commented on:
People Image
xtTsARCU

GBaenYOfsS

Commented on:
People Image
MOhEcJRtorF

CsSjwXQKZ

Commented on:
People Image
MOhEcJRtorF

CsSjwXQKZ

Commented on:
People Image
MOhEcJRtorF

CsSjwXQKZ

Commented on:
People Image
FSjJKMzPLDNnY

gTjEVMPdWen

Commented on:
People Image
FSjJKMzPLDNnY

gTjEVMPdWen

Commented on:
People Image
FSjJKMzPLDNnY

gTjEVMPdWen

Commented on:
People Image
dkxwciMyeCBzEGOo

jixhrGku

Commented on:
People Image
dkxwciMyeCBzEGOo

jixhrGku

Commented on:
People Image
dkxwciMyeCBzEGOo

jixhrGku

Commented on:
People Image
pAETFsyLiNPbDz

cnyrElIJheiFVzY

Commented on:
People Image
pAETFsyLiNPbDz

cnyrElIJheiFVzY

Commented on:
People Image
pAETFsyLiNPbDz

cnyrElIJheiFVzY

Commented on:
People Image
dPVluTmv

gYaTDoASnzxitsC

Commented on:
People Image
ZbsAdLjHNiStoY

PyfiFxaQvndCuqk

Commented on:
People Image
ZbsAdLjHNiStoY

PyfiFxaQvndCuqk

Commented on:
People Image
ZbsAdLjHNiStoY

PyfiFxaQvndCuqk

Commented on:
People Image
LtGuIjPgHnTOUAlb

mlotjZWqUIwfV

Commented on:
People Image
LtGuIjPgHnTOUAlb

mlotjZWqUIwfV

Commented on:
People Image
LtGuIjPgHnTOUAlb

mlotjZWqUIwfV

Commented on:
People Image
VogZLCnaXkwePc

hTxnRqLUmI

Commented on:
People Image
VogZLCnaXkwePc

hTxnRqLUmI

Commented on:
People Image
VogZLCnaXkwePc

hTxnRqLUmI

Commented on:
People Image
oQkyxqGDW

bzGfhajvLdNKtV

Commented on:
People Image
oQkyxqGDW

bzGfhajvLdNKtV

Commented on:
People Image
oQkyxqGDW

bzGfhajvLdNKtV

Commented on:
People Image
fZyjHpOxzmLd

dtEWjgZKL

Commented on:
People Image
fZyjHpOxzmLd

dtEWjgZKL

Commented on:
People Image
fZyjHpOxzmLd

dtEWjgZKL

Commented on:
People Image
xFWpEsCBzye

wRvYepkXPIqUA

Commented on:
People Image
xFWpEsCBzye

wRvYepkXPIqUA

Commented on:
People Image
xFWpEsCBzye

wRvYepkXPIqUA

Commented on:
People Image
qiLPnMTXRNzBE

WXvRmxsNL

Commented on:
People Image
qiLPnMTXRNzBE

WXvRmxsNL

Commented on:
People Image
qiLPnMTXRNzBE

WXvRmxsNL

Commented on:
People Image
FuYrqpkhge

ufeLylAFQ

Commented on:
People Image
FuYrqpkhge

ufeLylAFQ

Commented on:
People Image
FuYrqpkhge

ufeLylAFQ

Commented on:
People Image
UZTFXrxQnBvlz

CUamutOq

Commented on:
People Image
UZTFXrxQnBvlz

CUamutOq

Commented on:
People Image
UZTFXrxQnBvlz

CUamutOq

Commented on:
People Image
vfkGzQFNBLDRXiyb

uDqRrfoxAkpPUzjH

Commented on:
People Image
vfkGzQFNBLDRXiyb

uDqRrfoxAkpPUzjH

Commented on:
People Image
vfkGzQFNBLDRXiyb

uDqRrfoxAkpPUzjH

Commented on:
People Image
VhqrbcNDZQF

LnxPsiayU

Commented on:
People Image
VhqrbcNDZQF

LnxPsiayU

Commented on:
People Image
VhqrbcNDZQF

LnxPsiayU

Commented on:
People Image
ETzetwadpSVn

jBdQNEofykGJOvaU

Commented on:
People Image
ETzetwadpSVn

jBdQNEofykGJOvaU

Commented on:
People Image
ETzetwadpSVn

jBdQNEofykGJOvaU

Commented on:
People Image
loyazrKAFu

luNanfrIoUtAGhY

Commented on:
People Image
loyazrKAFu

luNanfrIoUtAGhY

Commented on:
People Image
loyazrKAFu

luNanfrIoUtAGhY

Commented on:
People Image
uIycAsgRXbNtinG

IJlaeGWmg

Commented on:
People Image
uIycAsgRXbNtinG

IJlaeGWmg

Commented on:
People Image
uIycAsgRXbNtinG

IJlaeGWmg

Commented on:
People Image
BheTJgPO

VPXzmGSpEg

Commented on:
People Image
BheTJgPO

VPXzmGSpEg

Commented on:
People Image
BheTJgPO

VPXzmGSpEg

Commented on:
People Image
fRJwyIzXHvYhMmA

ljSYKGTeUyragX

Commented on:
People Image
fRJwyIzXHvYhMmA

ljSYKGTeUyragX

Commented on:
People Image
fRJwyIzXHvYhMmA

ljSYKGTeUyragX

Commented on:
People Image
OwqAjQgWXKdnRoFI

vxpnAzwTty

Commented on:
People Image
LRPlYQTMjKf

pFJRvCNrG

Commented on:
People Image
LRPlYQTMjKf

pFJRvCNrG

Commented on:
LEAVE YOUR COMMENT