Topic: Javascript Not Updating in production

I have an app hosted on Heroku but currently is serving an outdated copy of my javascript file,
locally my changes are correct but they do not reflect after I push to Heroku. 

Can someone explain to me how I can fix this?

Thanks,

JM

Re: Javascript Not Updating in production

this is probably related to the asset pipeline
Check this link out. See if it helps! https://devcenter.heroku.com/articles/r … line-cedar

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Javascript Not Updating in production

What version of Rails?

Are you using assets pipeline,  i.e. are your javascripts in app/assets/javascripts?

Joe got a job, on the day shift, at the Utility Muffin Research Kitchen, arrogantly twisting the sterile canvas snout of a fully charged icing anointment utensil.

Re: Javascript Not Updating in production

It seemed like I had a similar problem last night. I pushed a change to Heroku, but I didn't see the change when I did the next "open heroku". I tried to open the file using ssh, but it seems that there's not a way to view the file contents on Heroku using ssh, or if there is I couldn't find it. So I re-did the push, and then my webpage showed up correctly. So I don't know if they have some caching going on, or if the first push didn't work. I'm trying out heroku, not sure yet if I'll stay with them. But not being able to examine the uploaded files is a big down-side in my view.

Re: Javascript Not Updating in production

Heroku is simple and great for playing around with apps in production mode but rapidly becomes very expensive and as it's a PAAS you are limited as to what services are supported and indeed many services that you would normally just install for free on a VPS are charged for to some extent o Heroku..
.
There are loads of hosting option available to you, I recently moved from RailsPlayground VPS (Fantastic host that I would highly recommend with live 24/7 chat support as well as ticketed support) to Linode after playing around with Rackspace and I have been very impressed with Linode.

There is no support on Rackspace unless you want to pay, Linode has a superb community with irc and forum help freely available and Ryan Bates has a very recent Railscast (http://railscasts.com/episodes/335-deploying-to-a-vps) showing how to set up an Ubuntu production server on a Linode.

Hostgator also seems to be highly recommended quite a lot by rails developers on this forum. Steer well clear of the main stream non dedicated rails hosts as most don't have a clue how to serve a rails app properly.

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: Javascript Not Updating in production

I've been looking into using Linode after watching the railscasts video you linked to. I'm on HostGator now, but I have a shared account, and because their shared accounts all include cpanel, you can't use Rails 3.1+ due to incompatibility issues (cpanel + mongrel + rails 3.1 doesn't work). The HostGator VPS offerings are more expensive than Linode, so I'll probably be moving to Linode.

Re: Javascript Not Updating in production

Sorry forgot to mention it's a Rails 3.2 application

Re: Javascript Not Updating in production

Then you most likely have a caching issue or an asset compilation issue. Did you look at that link I gave you in my first response?
Also, check that the asets get compiled when you push to heroku. Take a close look at all the output from your heroku push

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)