Changes show up locally but not on Heroku - ruby-on-rails

I've tried a bunch of different things as per suggestions, but cannot get it to work for me, what are some more alternatives?
When I git push, it says its already updated... is it a problem with uploading gem files, css? How can I know where it starts so I can then find an answer. It hasn't recorded any of my git push heroku master commands for a while apparently because there are many things missing & I just found out... Help!!!!
I'm pretty new at this, sorry guys!

You've got to run this from the command line:
git add . # Adds all files into the git
git commit -a -m "Your commit" # Creates commit
git push heroku master # Pushes commit to Heroku
This will put your latest version of code onto Heroku, and then you've got to ensure you've got the database connectivity sorted (so your data updates persist in production)

The problem was in passing a non-matching command to set my amazon bucket to what was on my production environment. Tutorial & huroku development center differed in syntax so I mixed them up apparently. So nothing after image uploading stage would work, all fixed now though! Thx

Related

Heroku deploying old version

I am fairly new to rails. I originally deployed a rails app on Heroku. I decided then to delete that app from the heroku website and then created a new heroku app using the same original file on my computer. I changed a few styles, but otherwise it's the same code. Whenever I do a git push heroku master now, it updates the new app with the old version. I am practically ripping my hair out. I've done
git remote -v
and it seems to be sending my code to the new source. But it's not! It keeps giving me the display from the older version. It seems to be pulling from a different source than what I am pushing to. Can someone help me?
Maybe you forget commit your changes or they aren't in master branch. Use this commands for diagnosis:
git status
git log heroku/master..master
git branch -a

Heroku and Git are not updating, pushing, or pulling properly

I'm literally falling apart at the seams with angry, nervous laughter. Someone PLEASE help me...
Screenshots: https://medium.com/p/4ff0a5af7f53
Run git status, I am on working branch Redesign with nothing to commit and a clean working directory.
Run rails server and navigate to localhost:3000. Yay pretty website, let's just denote it with a variable ABC
Run git push heroku Redesign:master, it tells me everything is up to date
Navigate to the website... it shows me a website that's totally different, XYZ, from several months ago
Ok, so I'm going to humor this, I'm going to navigate to a new branch Rollback and run a git pull from Heroku
Now on this Rollback branch I'm going to run rails server expecting to see the XYZ old site that I just pulled from Heroku
False, I instead get ABC (and the Sublime code shows the code for ABC as well)
By the way running the push with --force does not help. When I run heroku releases there is no record of this push.
WHAT IS HAPPENING????????
Sorry if I seem desperate... I've been at this for 2 hours
Ok this was dumb of me, #Chris I think you were going to stumble upon it. I had done a heroku rollback and didn't realize that when you rollback on Heroku, the git repo head commit doesn't change.
This is the thread that solved it: heroku rollback didn't update the HEAD remote branch, did it?
git add .
git commit -a -m "Message"
Have you performed these before you try and push? You have to update your local git repo before sending to Heroku

heroku app not being properly updated?

I'm new to the web development scene, so sorry if my lack of knowledge bugs you
When i run my local code using rails s and testing on my own server, the front end is not the same as the local one.
My first attempt was to initially fix some snippet of code, then use git push, then git push heroku master.
I've tried deleting the app and pushing fresh new code again, and it still doesn't work
I've tried heroku restart, and no changes also
Any suggestions?
edit
pictures for clarity
top is local, bottom is heroku server
Further to #RSB's comment, you'll probably find that your CSS is not being compiled properly
To fix this, you'll have to perform a precompile when you deploy. However, Heroku already does this, so probably won't be an issue
The best thing to do is eliminate any potential issues -
#config/environments/production.rb - config.serve_static_assets = true
local - rake assets:precompile RAILS_ENV=production
git add .
git commit -a -m "CSS Test"
git push heroku master
Try running this command in your project folder
heroku run rake assets:precompile

Ruby on Rails: Pushing to heroku - keys error

I have recently moved my app from a linux machine to windows, and I am trying to set it up with heroku again. There are problems with my keys, so I am just wanting to push the app up as a brand new app.
I do, git init, then git add ., then git commit -m "init", and now I do heroku create.
I want to just push my folder up to the new app cedar, but everytime I run git push heroku master is tries to push to the old one, and an error flags as my keys don't match.
Anyone have any ideas? Thanks
Execute heroku auth:logout to logout, then heroku auth:login to login again.
To read full help message, try
heroku help
heroku auth
It seems that you're calling heroku apps:create wrongly? Take a look at the documentation here.
Also, the deployment documentation might be more useful for you if you already have a git repository setup.

rails app in development doesn't show up on heroku

Im developing a rails app. Following this tutorial here:
Tutorial
I finished a part and wanted to push all the changes up to heroku and view them there. I can view the site on my local machine. On heroku all I see is this:
I typed in the following commands after I made my changes, saw the site was working on my local computer.
$ git add .
$ git commit -m "Finish layout and routes"
$ git checkout master
$ git push
$ git push heroku
$ heroku open
I even looked at the heroku logs but couldn't make sense of whats going wrong! There is no content in my database, its empty. I just have views setup.
Why did you checkout to master? Are you working on another branch?
If that is the case, you will need to merge your changes to master before pushing your code (supposing you are on master which is already the case after the checkout):
git merge other-branch
Also don't forget to migrate your database on heroku.
heroku rake db:migrate
EDIT
To find out your current branch, type:
git branch
It will mark the current branch with a '*'.
If you have removed the public/index.html file, you'll have to do git rm public/index.html as well, then commit and push to Heroku. If you delete a file locally, git won't pick up on that without doing the git rm, and Heroku's knowledge of your app is 100% through Git.
I had a similarly strange (but unrelated) problem when I had an app that was storing uploaded files on Heroku. Every time I'd do a push they'd all go away. It confused me greatly until I realized that Heroku essentially wipes every time you do a push, and anything that isn't in git isn't kept. A good reason to use S3 or similar for uploaded file storage.

Resources