I am trying to deploy a playframework-based app (play 2). When I run it locally, all is well. When I deploy to heroku, instead of reading the message from the message file, the app just spits out the message name. eg: this code:
#Message("app.title")
results in
app.title
rather than the value in the conf/messages file. Locally, it works fine.
Note that I'm not internationalizing my site, just using the default messages file in order to separate text from code (and maybe internationalize some day :)
The issue was that I had named my file "Messages", which was fine on Mac OS X (case-preserving but not case-sensitive file system), but not okay on Heroku. I realized this pretty quickly and fixed it, but unfortunately, git did not see the fix. I had to delete, commit, re-add and recommit. I suspect a name-change (not just case-change) would have been adequate as well.
Thanks to James Ward (who really answered this question) for the suggestion.
Related
I did multi-linguistic webpages with two language buttons on each page. It should work in the way when people click Next and their language option of the previous page maintains on the next page. It works like this on my local host, but when deploying it on Heroku the language option always turns back to the default language when clicking Next. I wonder if this problem is because something is missed when Heroku fetches my codes from git remote repository?
I also host the webpage on Linux server. Like on my local host, the problem doesn't happen on Linux server. I'm pretty sure the problem is with the git repository and/or Heroku. Thank you!
The problem is gone when I recently upload app to Heroku. When a language button is toggled, the language choice is carried to next page on Heroku. I tried to figure out how the problem is solved. There are two possible reasons: One is Heroku platform is somehow updated, the other could be some changes in my oTree codes. I attach some changes I made in my codes, in case someone got the same problem. Note that otree must be <5 for now, because otree 5.0 now is not compatible with Django and to develop multi-linguistic page, Django is very necessary.
Codes in requirements.txt:
-r requirements_base.txt
psycopg>=2.5.1
otree==3.0.9
Codes in requirements_base.txt:
numpy>=1.16.2
scipy>=1.1.0
I have one project, which I’ll call “Working”, because it works fine, and all login/etc. works fine.
I copied the “serverless.yml” file and changed everything appropriate to start a new project, which I’ll call “Puzzling”.
On the “Puzzling” project, I can log in just fine, but when I refresh the browser, I’m logged out again. So I cannot do things like (e.g.) change a user’s password.
I have all the Cognito configuration in a “config.json” file, with all the right settings.
In fact, if I copy just the “Puzzling” config.json file over to the “Working” project, then the “Working” project stops working properly! So I don’t think it’s my code.
I’ve compared the two “serverless.yml” files carefully… I don’t see anything different.
Any clues VERY MUCH appreciated… Thanks!
Fixed: Rebuilt the project by copying from "Working".
POSSIBLY:
One difference is that "Working" allows users to sign themselves up, and "Puzzling" did not.
Another thing is that when I went to delete the server code, it failed, saying that the database (or another resource, I forget exactly) was owned by another project. I deleted that project through the AWS Cloud-formation UI (which only partly worked...).
(And thanks #NewUser, but it's really a lot of code.)
Today I made a change to my rails app, deployed it to Heroku, and everything seemed fine. But then, when I looked at the production website, my changes were not reflected. I ran heroku releases (and looked at their web dashboard version of this information) and indeed it shows my code should be there. It's pointing to the git commit that has my changed code in it as the one that was the most recent release.
Here's where it gets crazy: I use heroku run bash to get into the filesystem of my actual server, I use cat to view the changed file, and the new code isn't there! It's still the old version.
Has anyone seen this before? What else can I do to debug/fix this issue?
There is currently a large issue with Heroku that seems to be happening.
Their site: https://status.heroku.com/ seems to claim its only for Performance-L dynos. But if you search https://twitter.com/search?q=heroku&src=typd, you'll find convos about a lot of people not seeing the newest code deployed and/or having apps fully crashed.
I am in an interesting situation where I maintain the code for a program that is used and distributed primarily by our sister company. We are ready to distribute the program to all of the 3rd party users and since it is technically our sister companies program, we want to host it on their website. (in the interest of anonimity, I'll use 'program' everywhere instead of the actual application name, and 'www.SisterCompany.com' instead of their actual URL.)
So I get everything ready to go, setup the Publish setting to check for updates at program start, the minimum required version, and I set the Insallation Folder URL and Update Location to "http://www.SisterCompany.com/apps/program/", with the actual Publishing Folder Location as "C:\LocalProjects\Program\Publish\". Everything else is pretty standard.
After publish, I confirm that everything installs and works correctly when running directly from the publish location on my C: drive. So I put everything on our FTP server, and the guy at our sister company pulls it down and places everything in the '/apps/program/' directory on their webserver.
This is where it goes bad. When I try to install it from their site, I get the - File, Program.exe.config, has a different computed hash than specified in manifest. Error. I tested it a bit, and I even get that error trying to install from any network location on our network other than my local C: drive.
After doing the initial publish in visual studio, I have changed no files (which is the answer/reason I've found by doing some searching about this error).
What could be causing this? Is it because I set the Installation Folder URL to a location that it isn't initially published too?
Let me know if any additional info is needed.
Thanks.
After bashing my head against this all weekend, I have finally found the answer. After unsigning the project and removing the hash on the offending file (an xml file), I got the program to install, but it was giving me 'Windows Side by Side' Errors. I drilled down into the App Cache were the file was, and instead of a config .xml file, it was one of the HTML files from the website the clickonce installer was hosted on. Turns out that the web server didn't seem to like serving up an .XML (or .mdb it turns out) file.
This MSDN article ended up giving me the final solution:
I had to make sure that the 'Use ".deploy" file extension' was selected so that the web server wouldn't mangle files with extensions it didn't like.
I couldn't figure out why that one file's hash would be different. Turns out it wasn't even the same file at all.
It is possible that one of the FTP transfers is happening in text mode, rather than binary?
For me the problem was that .config transformations were done after generating manifest.
To anyone else who's still having trouble, five years later:
The first problem was configuring the MIME type, which on nginx (/etc/nginx/mime.types) should look like this:
application/x-ms-manifest application
See Click Once Server and Client Configuration.
The weirder problem to me was that I was using git to handle the push to the server, i.e.
git remote add live ssh://user#mybox/path/to/publish
git commit -am "committing...";git push live master
Works great for most things, but it was probably being registered as a "change," which prevented the app from installing locally. Once I started using scp instead:
scp -r * user#mybox/path/to/dir/
It worked without a hitch.
It is unfortunate that there is not a lot of helpful information out there about this.
This is quite specific problem: developer's machine with Win 7 Ulttimate has cyrillic user folder name, which cannot be changed due to the plenty of another programs rely on this path.
Need to deploy php-app on Heroku.
Using the Heroku toolbeit on this computer, I found while "heroku create" the follow error - "...no such file or directory open...".
By the simple experiment, I found that problem is in cyrillic name of user folder. Undeк another user's account is OK. So, question - is there any case to tune the Heroku fot correct work with such cyrilic enviroment ?
A fix for cyrillic characters in usernames has been pushed to https://toolbelt.heroku.com/ specifically for this problem. Please run the installer again and retry the heroku create command. It should work starting with heroku/toolbelt/3.42.25 (version information is available from heroku version)