Heroku deploying old version - ruby-on-rails

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

Related

Heroku app removal

Rails 4 application.
Using Cloud9 editor (Not AWS)
Question:
I was getting several errors in my Heroku app when I tried to push my completed work. It was showing a Segmentation fault error. My mentor suggested I delete and recreate the app and try to redeploy. Like the noob that I am, I deleted the application from my Heroku repository instead of destroying it in my Rails console. I proceeded to with a heroku create command and created a new app. However, when I went to git push heroku master it references the old app and gives a fatal: repository 'https.....' not found error.
How do I destroy the old app when the repository is still referenced/embedded in my code. Any suggestions would be greatly appreciated.
from your command line, execute heroku apps:destroy
if it doesn't work, check your Git remote repository list by executing git remote -v
if there is "heroku" in the one of the list, then delete it by git remote rm heroku
and then create new Heroku app as what you do usually

Changes show up locally but not on Heroku

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

starting with heroku; fail updating rails app

after a few months learning a bit about rails and making some stuff local, I wanted to try to upload a simple rails app to heroku. Which, by the way, was a pain in the ass because of installing issues of Postgresql. But ok, that's done.
Now I create an app on heroku, I did the login, key thing, git, and uploaded. Was fine, very easy after all. I just uploaded an empty rails app, to try heroku.
Well, then I add a controller. Upload again via git push heroku master and not so fine! I did scaffold, for my articulo controller. And I wasn't able to open the URL once pushed to heroke on someurl/articulos. I got an 404 heroku message here: http://enigmatic-scrubland-8865.herokuapp.com/articulos
Then I create a controller for the home site and get rid of the "welcome aboard" default site. Again push heroku... On terminal I got messages all updated, and lauching. All fine.
But then I access and again, the "welcome aboard" default page.
Locally it works fine. But now I'm not sure if I'm doing it well. It scares me that no failing messages are to see nowhere, but obviously it fails.
After editing my rails app, I always do this:
$ git init
$ git add .
$ git commit -m "init"
$ git push heroku master
Like the documentation says on heroku. But, no error and no updating.
Thanks in advice.
From what I see from heroku devcenter, the git init part is only to be done on the first initial creation of the git repo, not "After editing my rails app".
In other words, you shouldn't have to "always do" a git init after editing your rail apps.
For the first push, I would recommend a:
git push -u heroku master
That way, all the subsequent push will be a simple:
git push

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