Posts

Showing posts with the label heroku

Heroku command not found

Image
Clash Royale CLAN TAG #URR8PPP Heroku command not found After installing Heroku Toolbelt, in terminal on Mac when trying to run the following command: heroku I get the error: bash: heroku: command not found When I do: gem environment I get: - RUBYGEMS VERSION: 1.3.6 - RUBY VERSION: 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0] - INSTALLATION DIRECTORY: /Library/Ruby/Gems/1.8 - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby - EXECUTABLE DIRECTORY: /usr/bin - RUBYGEMS PLATFORMS: - ruby - universal-darwin-11 - GEM PATHS: - /Library/Ruby/Gems/1.8 - /Users/Bart/.gem/ruby/1.8 - /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 - GEM CONFIGURATION: - :update_sources => true - :verbose => true - :benchmark => false - :backtrace => false - :bulk_threshold => 1000 - REMOTE SOURCES: - http://rubygems.org/ I've tried adding several paths to $PATH, but nothing works... ...

Why is SECURE_SSL_REDIRECT always getting set to True?

Image
Clash Royale CLAN TAG #URR8PPP Why is SECURE_SSL_REDIRECT always getting set to True? I currently have a local .env file which contains parameters for my local environment. I have a Django App hosted on Heroku where I assign my config variables. I figured using python-decouple 's .env file to set SECURE_SSL_REDIRECT=False and then in my settings.py use SECURE_SSL_REDIRECT = config('SECURE_SSL_REDIRECT') would work. However, no matter the case, if Django sees SECURE_SSL_REDIRECT = True ANYWHERE, it tries to load as HTTPS and my god is it frustrating. .env python-decouple SECURE_SSL_REDIRECT=False settings.py SECURE_SSL_REDIRECT = config('SECURE_SSL_REDIRECT') SECURE_SSL_REDIRECT = True By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Setting Up S3 with Heroku and Django with Images

Image
Clash Royale CLAN TAG #URR8PPP Setting Up S3 with Heroku and Django with Images so I currently have my static files (js and css) just being stored on Heroku which is no biggie. However, I have objects that I need to store multiple images too and be able to get those images on request. How would I store a reference to those images? I was planning to use a S3 Direct File Upload using these steps on Heroku here. Is this also going to be the best way for me to do so? Thank you in advance. By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How to get local heroku app to connect to remote REDIS?

Image
Clash Royale CLAN TAG #URR8PPP How to get local heroku app to connect to remote REDIS? I am new to Heroku/Redis. I have created a basic node.js and express APP to which I have added a REDIS addon. heroku addons:create heroku-redis:hobby-dev -a MyApp I have an index.js from which the server runs on port 5000 index.js const express = require('express') const path = require('path') const PORT = process.env.PORT || 5000 const client = require('redis').createClient(process.env.REDIS_URL); express() .use(express.static(path.join(__dirname, 'public'))) .set('views', path.join(__dirname, 'views')) .set('view engine', 'ejs') .get('/', (req, res) => res.render('pages/index')) .listen(PORT, () => console.log(`Listening on ${ PORT }`)) My repo is connected to my personal github from Heroku where the app runs fine, but whenever I try to run it locally it seems it tries to connect to REDIS locally so I h...