Django not translated in Heroku while in development it is - heroku

I had Django 1.5.5 translation working correctly in development but when deployed to Heroku strings were not being translated.

The reason was that I had *.mo in my global .gitignore and so I added !*.mo to the local .gitignore to solve it.

Related

How to call laravel variables from inside YAML file?

In laravel .env file we can call another variable like this ${APP_URL} . Now I uploaded my app to google cloud app engine and using app.yaml but it isn't working. Can anyone help me solve it?
As per what was discussed in the comments, I believe that what you want to do is to simply declare APP_URL in your app.yaml to use it as a placeholder in other parts of the same app.yaml file.
The problem with that approach is that yaml does not support placeholders natively, so in order to do this you would have to use Anchors and Alias nodes as a workaround. You can find more details and also an example on those topics in this community answer.
After I wanted to deploy my Laravel app to google cloud I have faced many challenges. For example, I couldn't access static files in my public folder. That was solved with 'handlers' in app.yaml. And for my own question, we can remove .env from exclude and uploaded beside app.yaml file and it works well and this syntax '${APP_URL}' is working well. My app is a single page and it is working on Google App Engine well right now. Thanks

Deploy ember-cli and rails api

I'm looking for a way to deploy on Heroku a Rails API and an ember-cli application. My directories structure is something like that:
application
frontend
rails-api
Can someone help me? I'm really new Heroku user.
PS: I don't want to use gems like 'ember-cli-rails'
I would deploy them separately, and keep them in separate git repos.
Ember
Use ember-cli-deploy. I would suggest you look into the ember-cli-deploy-lightning-pack. There is a presentation about it here.
This automates the release process -
Builds your Ember app, with asset fingerprints
gzips the assets
Uploads changed files to AWS S3
Puts the full content of your index.html into Redis
Rails
deploy your rails-api app to heroku normally
include a redis addon
set up the route which serves index.html to query it directly from Redis instead
I would suggest aliasing all non-api routes (ie a catchall route) to the root route so you can 'deep link' to your ember app
A big advantage of this process is that you can deploy changes to your frontend very quickly, and without having to take down or restart the server.

How do you access assets in a Pakyow app on heroku?

Problem: Pakyow App deployed to Heroku and all JS and CSS sourced/linked in template head 404.
I assume this is a problem stemming from Heroku, but rather not one that I am aware of. As far as I know, Heroku allows static assets in the public directory.
Anyway, looking for some helpful pointers from Pakyow users.
The app (currently) is at http://pakyow-go.herokuapp.com and the repo can be found at http://github.com/jphager2/pakyow-go.
This is an unfortunate default config option in the currently released version. To get around it, add this to the production configuration block in app.rb:
app.static = true
The reason it works this way out of the box is in most production cases you don't want the app serving static files. This would instead be the responsibility of the HTTP server. On Heroku though, you want the app server to serve static files unless you host them from a CDN.

Basic HTTP Authentication for a Middleman app

I wonder whether there's an easy way to add Basic HTTP Authentication to a Middleman deployed website? I found some Heroku specific gists, but nothing else.
The Heroku specific gists all seem to need a config.ru file, but do Middleman projects even have such a file? Mine don't.
config.ru is not specific to Middleman or Heroku, but is a convention for serving a rack-based app (see https://devcenter.heroku.com/articles/rack). If you want to have basic auth on a static site that you have built using middleman and then deployed, you will need to set it up in a way that's appropriate to that hosting. Where are you hosting the site?

How to remove uppercase URL's with octopress Heroku blog?

I am converting my blog to octopress/jekyll hosted on Heroku.
It all works well locally however when loaded up to Heroku I get capitalised URL's that seem to persist across updates and rebuilds of the remote repository.
The posts at locations like mydomain/category/postname contain html redirection files to help with the change in url structure between the previous wordpress domain/category/postname to the default octopress style domain/yyyy/mm/dd/postname. These are created using the Alias Generator plugin from tsmango
If I type http://www.williampickup.org/Ceramics/john-dermer into a browser the redirect works, while the lowercase version doesn't. The uppper case directory names for categories were an artefact of the original script I used to create the Alias yaml entries in my blog posts. I have fixed that locally however I can't seem to upload the correct lowercase directory structure to Heroku.
Eventually I noticed that the directory names were being capitalised when I committed the changes to my git repository.
The solution turned out to be to change the git config setting so that ignorecase = true.

Resources