2

i m following michael hartl's ruby on rails online tutorial book and finished chapter 10:

my localhost displays everything in proper format:

profile page looks like this on localhost: http://img225.imageshack.us/img225/5301/profilen.png)

news feed looks like this on localhost: http://img826.imageshack.us/img826/2280/newsfeed.png)

but please visit--> whizcollab.herokuapp.com and check out the styling changes in comparison to the localhost...it looks very weird. all the content seems to be there but the css is different in my opinion. all the files are uploaded through git properly and pushed up to the herokuapp.

is there a compatibility issue?

please guide :)

ShivvyBee
  • 353
  • 1
  • 4
  • 11

2 Answers2

0

That can't possibly be the same code deployed to the Heroku instance as you show locally in the screenshots. There are elements missing in the Heroku version.

Chris Wise
  • 129
  • 3
  • i really tried to look into all the files that are on my git hub repo and on my local machine..i couldn't find a difference...is there any way around this? i was thinking maybe i could create a new repo on github and upload the same files and then push to heroku... please guide me as i am a beginner at ROR. thanks :) – ShivvyBee Aug 23 '12 at 12:10
0

Remember to do a 'git add .' then check with a 'git status'. If there are any files listed iteans that heroku did not receive your latest change. Just do a 'git push heroku master' and you should be fine.

Benjamin Tan Wei Hao
  • 9,621
  • 3
  • 30
  • 56
  • i made more changes to my app locally and added more functions..did the whole git add and push to heroku thing but still the css is different on localhost than on herokuapp...this is very weird...is there any way to get around? can i create a new repo on github and then upload my files again? please guide me as i am a beginner at ROR and merely following a tutorial to learn..thanks. – ShivvyBee Aug 23 '12 at 12:09
  • One thing you can try is to delete the YOUR_APP/public/assets folder. Then commit everything and try pushing again – Benjamin Tan Wei Hao Aug 23 '12 at 14:12
  • hmm so i deleted everything in that folder and tried to run git add . and then git commit but git commit gives me an error saying "changes not staged for commit" – ShivvyBee Aug 23 '12 at 14:23
  • make sure you're in your root folder of your app before you do `git add .` – Benjamin Tan Wei Hao Aug 23 '12 at 14:48
  • still gives me the same error.... : ( i was definitely in the root folder when i tried before as well.. – ShivvyBee Aug 23 '12 at 15:23
  • See if this answer helps: http://stackoverflow.com/questions/7704480/why-does-git-commit-not-save-my-changes – Benjamin Tan Wei Hao Aug 23 '12 at 16:08
  • wow...the css is actually fixed! could you please explain how removing the public assets folder automatically fixes things? – ShivvyBee Aug 27 '12 at 02:57
  • heroku looks for a manifest.yml file when you push to heroku. if it sees that file, which lives in public/assets, then it will assume you have precompiled and not perform any assets compilation. so that would be great if you did not make any changes to your css, not so great otherwise. – Benjamin Tan Wei Hao Aug 27 '12 at 03:09