When I perform a deployment, the changes are not reflected
techgosafeagency
PROOP

2 months ago

Hello, I just deployed a code change, but it seems that this change is not being reflected in my production environment. I tested my change with my main branch locally and I can see that the change is working, but it does not seem to be reflected in the environment.

Steps I took to test

- Initially, I tested the changes from a staging branch on my local machine (it works).

- From my main branch, pointing to my production database from my local machine and using production data, the changes work.

- Using the same production data from the local test, making the request to the API in production (environment) returns an incorrect result.

It seems as if the changes that were deployed are not being reflected in the environment or are being handled by some kind of cache.

$20 Bounty

3 Replies


2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 2 months ago


domehane
FREETop 10% Contributor

2 months ago

step 1 , check your commit go to deployments tab and make sure the commit sha matches your latest github commit. if it doesn't match, that's your problem right there.

step 2 : disable build cache add this environment variable to your service:

NO_CACHE=1

then redeploy. this forces railway to rebuild everything fresh

step 3 , check for build artifacts if you have folders like dist/, build/, or .next/ committed in your git repo, railway might be using those old files instead of building new ones. add them to .gitignore and remove from git if needed.

to force a fresh deploy: use CMD + K (ctrl + k on windows) → type "deploy latest commit"

verify it worked: check your deployment logs or add a quick console.log to confirm the new code is running.

the no_cache fix works in most cases. let me know if this solves it for you


darseen
HOBBYTop 5% Contributor

2 months ago

Go to Settings > Branch and make sure you are on the correct branch


Loading...