FAQ Database Discussion Community


Sessions always empty with flask / heroku

python,session,heroku,flask,gunicorn
I'm having an issue with my application on Heroku where sessions aren't persisting. Specifically, flask's SecureCookieSession object is empty, every time a request is made. Contrast this with running my application on localhost, where the contents of SecureCookieSession persist the way they should. Also I'm using flask-login + flask-seasurf, but...

Faye Ruby Server Side Publish on Heroku - EventMachine buffer overflow detected

heroku,websocket,out-of-memory,publish-subscribe,faye
I have a faye ruby client on a heroku worker (using sidekiq - 5 threads) that publishes to the faye server running on linode. The worker crashes after a few minutes with a buffer overflow detected message. *Code EM.epoll EM.run { publication = @client.publish('/glive-bullion','body'=>body) publication.callback do EM.stop_event_loop end publication.errback do...

Rails + Heroku + Cloudflare - Eliminate www as a subdomain

ruby-on-rails,heroku,cloudflare
I have a multi-tenant Rails 4 app that uses subdomains with PostgreSQL schemas to 'tenant' the application. I have the subdomain wildcards "*" set up in Heroku and Cloudflare and the site loads, but it keeps "thinking" that the www is a valid subdomain. Because of this, normally valid links...

Sinatra cannot find file that is clearly there

ruby,heroku,sinatra
I do not know what to do. It is giving me this error on the line which contains erb :RUSure I don't understand why that is different from any other lines where I use erb :whateverFileName It is not that it is in a different directory, because it is in...

How to handle user editable templates in a cloud stateless hosting environment?

php,git,symfony2,heroku
I've been using since a few year now a home-made PHP CMS/ERP based on Symfony components for my clients. Every site using this framework is hosted on a "classic" linux hosting and I use git to deploy updates. Every site has a folder that stores html/css templates, images and downloadable...

Implementing PeerJS Server with multiple dynos on Heroku

node.js,heroku,scalability,peerjs
I've already implemented PeerJS with Express in my node.js application using: app.use('/peer', peer.ExpressPeerServer(app, {proxied: true})); My concern is that when I eventually scale the application onto multiple dynos to accomodate traffic, it won't be able to signal between peers that have been connected to different dynos through heroku's internal process...

Ruby Sinatra/Postgres - can't connect to heroku database with PG.connect?

ruby,postgresql,heroku,sinatra
I am trying to get a site set up on Heroku using Sinatra and PostgreSQL. It worked locally (connecting to local database), but after pushing it to Heroku and changing my PG.connect to reflect that, I get an Internal Server Error the moment a page tries to access the database....

Is there a way to put local_settings.py to Heroku bypassing Git?

python,django,git,heroku
I'm willing to handle different settings locally and on Heroku. So I use this import at the end of my settings.py: try: from local_settings import * except ImportError: pass I got local_settings.py locally, not stored in Git. Is there any way to put another local_settings.py to Heroku bypassing Git?...

Rake Task not working on Heroku

ruby-on-rails-4,heroku,rake-task
I am trying run a Rake Task that insert records in DB, but when i run this rake task, i see this error: NameError: uninitialized constant Classified Classified is a model on the DB. This Rake task work well on my local machine (development and production RAILS_ENV). heroku not allow...

Setting Asset Cache Expiration in Rails / Cloudfront / Heroku

ruby-on-rails,ruby,heroku,amazon-cloudfront
I'm getting errors from the Google pagespeed tool saying that cache expiration is not specified for my assets. I'm serving asserts through cloudfront, and my site (Ruby on Rails) is hosted on Heroku https://www.driverhunt.com/…9a42dc64767309bbb76af8a1eaef10b3c0cb.css (expiration not specified) https://www.driverhunt.com/…74901ff9e954e9fca26f71542e8fc8d807684.js (expiration not specified) https://www.driverhunt.com/…ad7b9e065ed95559bdf1c426bc94834f09e0.jpg (expiration not specified) Firstly, it looks like things...

Heroku: can I recover database after removing the add-on?

database,heroku,add-on,heroku-postgres
I prematurely removed the Heroku Postgres Hobby Basic add-on from my account which housed a database I was using (I removed it via the dashboard). Is there any way to recover this database? I tried to add the add-on again but it was a fresh database. Thanks for any help!...

Redirect Loop on Heroku with Rails 4 App, but not on local machine

ruby-on-rails,ruby-on-rails-4,heroku,dns
App running Ruby 2.2.2, Rails 4.2.1 When I run my app locally everything is fine. It was running fine on heroku until I made some updates. Now all I get in a browser is "Err too many redirects" from Chrome, or "Too many redirects..." in Safari. Even after I rolled...

Heroku Websockets with Java ECONNREFUSED (Connection refused)

java,heroku,java-server,java-websocket
I am writing a small game server using Java. I use TooTallNate-Java-Websockets library to create my websocket server. Everything works when I run my server on localhost , I can connect to it from everywhere.However when I submit my app to Heroku , every time I try to establish a...

After push the Rails app to Heroku, blank page

ruby-on-rails,ruby,git,postgresql,heroku
First, I was getting a "precompile" error and I have solved it running this code RAILS_ENV=production bundle exec rake assets:precompile Second I needed to add a code for the database run in production mode that was: production: adapter: postgresql encoding: unicode host: localhost port: 5432 database: catarse_production pool: 5 username:...

Rails app Time to first byte very high using heroku

ruby-on-rails,heroku,pageload
When loading my rails app in production (hosted on heroku) it takes up to 10 seconds to load. This only happens on the very first time the site is loaded. Any subsequent page views load normally. View at kurtiselliott.com

Heroku RAM not increasing with upgraded dynos

ruby-on-rails,ruby,ruby-on-rails-3,memory,heroku
I have a massive function i have been calling manually through the heroku rails console. I have been receiving the error rapid fire in my logs: 2015-06-22T14:56:42.940517+00:00 heroku[run.9877]: Process running mem=575M(112.4%) 2015-06-22T14:56:42.940517+00:00 heroku[run.9877]: Error R14 (Memory quota exceeded) A 1X dyno is suppose to have 512 MB of RAM. I...

heroku pgbackups:url command is no longer working?

ruby-on-rails,postgresql,ruby-on-rails-4,amazon-web-services,heroku
How do I download my dump directly from Amazon AWS S3 if heroku pgbackups:url b004 isn't working? Specifically, when I run this command it returns: ! Please add the pgbackups addon first via: ! heroku addons:add pgbackups And then when I run this command I get: ! No such add-on...

Postgres: Combining multiple COPY TO outputs to a postgres-importable file

postgresql,heroku,import,copy,export
I have my database hosted on heroku, and I want to download specific parts of the database (e.g. all the rows with id > x from table 1, all the rows with name = x from table 2, etc.) in a single file. From some research and asking a question...

How to change database_url on heroku?

postgresql,heroku
I am trying to share a database between two apps on Heroku according to Share database between 2 apps in Heroku but setting up database_url on the second app gives an error: $ heroku config:add DATABASE_URL=postgres://... Setting config vars and restarting pacific-headland-1960... failed ! Cannot destroy last attachment to billing...

remote: ! Precompiling assets failed. (Heroku)

ruby-on-rails,ruby,heroku
So, I typically don't have any issues deploying apps to heroku, however, in this specific case I'm getting a precompile failed error... This line here stands out to me: remote: NoMethodError: undefined method `[]' for nil:NilClass But here are the full error logs: remote: Bundle completed (9.35s) remote: Cleaning up...

Meteor application not pushing to Heroku error

heroku,meteor,sass,bourbon
I built a Meteor app that uses the bourbon scss library. I tried to push my app to heroku got the following error: Errors prevented bundling: While building the application: client/styles/bullets.scss: Scss compiler error: undefined /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/bullets.scss:1: file to import not found or unreadable: "bourbon/bourbon" Current dir: /tmp/build_52129b38b75a2e6238de86ec866d89cf/mauvsa-gala-9a1eb00877caedf4b5202f30825b1627fb75f874/client/styles/...

sqlite issue with heroku

ruby-on-rails,sqlite,heroku
I was using sqlite gem for my rails project, and since I had to put the app on Heroku, and Heroku doesn't support sqlite, I added pg gem to my Gemfile. gem 'pg', '0.17.1' But now I am not able to run the project locally on my machine. Specified 'sqlite3'...

Check queued reads/writes for MongoDB

node.js,mongodb,heroku,compose
I feel like this question would have been asked before, but I can't find one. Pardon me if this is a repeat. I'm building a service on Node.js hosted in Heroku and using MongoDB hosted by Compose. Under heavy load, the latency is most likely to come from the database,...

Database Migrations on Secondary Database on Heroku

ruby-on-rails,ruby,database,heroku,rake
Our company acquired an application from another company, so I'm a little unfamiliar with how they may have done this in the past. Currently there are two applications in Heroku. A production and staging app. Below is the basic app setup for clarity. Production App WHITE // Primary database BLACK...

Seems unable to pull config vars from the environment (Heroku)

ruby-on-rails,ruby,ruby-on-rails-4,heroku,environment-variables
My Rails app seems unable to pull config variables from the environment. Forms work fine when credentials are hard-coded but when I try to use the environment variables it fails. What could be going wrong? I might have made a basic mistake since I'm only a newbie programmer. I've set...

ERROR: permission denied for relation after Heroku pg_dump and import to development database

ruby-on-rails,database,postgresql,heroku,navicat
I am pretty new to heroku & postgresql. I am trying to dump my production database into my local development database in my local machine. I dumped like this (my actual info redacted): pg_dump --host=<myhost> --port=<port> --username=<username> --password --dbname=app_production > output.sql Then I imported to my local app_development database like...

Prevent Display Of Html Tags From User Input Sinatra?

ruby,heroku,sinatra
I have an app where users can input whatever they want, and it will show up on a separate page. I would like to have it display exactly what the user inputs and not process the tags as html. For example if a user inputs let me use a <hr>...

Brand new Luminus app giving Error: Could not find or load main class clojure.main

heroku,clojure,procfile,luminus
I just created a Luminus app by running: lein new luminus foobar and when I try to run it with foreman like this: foreman start the way the docs describe, I get this error: Error: Could not find or load main class clojure.main which is also the same error I...

Heroku deployment - RoR - “Detected manifest file, assuming assets were compiled locally”

ruby-on-rails,ruby,heroku,web-config
RoR rookie here with a small issue regarding Heroku deployment. Asset pipeline is not getting compiled when I deploy to Heroku. I tried a lot of suggestions available online but with no success. In my build, I see "Detected manifest file, assuming assets were compiled locally" message and my page...

Receiving an error upon heroku login not sure why permission seems to be the issue

git,heroku,terminal
I keep getting this error but if I do sudo heroku login it works... How do I fix this, I even tried to do ssh generate but it works with sudo only too... The-MacBook-Pro:prod lior$ heroku login ! Error reading /Users/lior/.netrc ! Permission denied - /Users/lior/.netrc ! You may need...

Directive/Factory Not Working in Production

javascript,angularjs,flash,heroku
I have a directive that prints out flash messages for users. Everything works fine on my localhost but as soon as I test it out on Heroku, the flash message does not appear. Here is the controller. angular.module("alerts") .controller("AlertsController", alertController) alertController.$inject = ['Flash'] function alertController(Flash) { var vm = this;...

rails db:migrate fails rake aborted ActiveRecord::NoDatabaseError

ruby-on-rails,postgresql,heroku
On cloud9 IDE I installed postgresql because that is needed to deploy on Heroku, I am learning this so I am not sure, when I try to migrate a simple database table I used this bundle exec rake db:migrate and I get a rake aborted and a ActiveRecord::NoDatabaseError: FATAL: role...

Querying a Postgres View

postgresql,heroku,views
I created a view using the new Postgres Studio from Heroku. I'm unable to query the view in my code. I can list the view using \dv as shown below but if I attempt a select * from x I get a relation "x" does not exist error. So how...

node.js createWriteStream doesn't create new file on Heroku

node.js,heroku,node.js-stream
I have following code that works fine on my localhost running node.js 0.12.0. The code creates a new file, and copy data from readable, but it doesn't create new file on Heroku. var output = fs.createWriteStream('public/images/test/testfile.png'); readable.pipe(output); I thought it has something to do with the permission, but whenever I...

cannot rename name apps of cli in heroku

heroku,heroku-toolbelt
I´m trying to rename apps of cli, but I get the error, that No app specified. I done heroku create heroku apps:rename newname ...

Deploying a tar file from CI to heroku

heroku,playframework
I have a play application for my website. Currently, codeship builds it, and heroku deploys it once the build succeeds. The problem is that since the project has become too big, heroku is not able to build it within 15 minutes while codeship can still build it in less than...

Bonsai automatic indexing

mongodb,heroku,express,elasticsearch,bonsai-elasticsearch
I use MongoDb for storage with an express, Heroku-hosted app. I would like to provide search capabilities to some MongoDb collections, using ElasticSearch via the Bonsai Heroku add-on. However, according to the Bonsai faq, Elasticsearch River plugins are not supported. How can I automatically re-index my MongoDb collections (when a...

Heroku src refspec master does not match any

ruby-on-rails,heroku
I am looking to deploy to Heroku, however I receive an error when running the command git push heroku master error: src refspec master does not match any. error: failed to push some refs to 'https://git.heroku.com/aytaken.git' Does someone know how to fix this?...

Heroku: Permission denied (publickey). fatal: Could not read from remote repository when doing git push

ruby-on-rails,git,heroku
I've spent the day reviewing all the existing solutions suggested on Stackoverflow and elsewhere, and tried them without success, and I'm still stuck with this. The "heroku keys:add" solution doesn't work for me, so please don't link me back to that one. I'm on MacOSX Lion. Thanks...

Deploy to heroku without redirecting to localhost with passport callback

facebook,heroku,oauth,callback,passport-facebook
I've deployed an app to Heroku, however once you click 'log in with facebook', you are redirected to http://localhost:3000/#=. I've tried the following (the first is where it is at the moment): passport.use(new FacebookStrategy({ clientID: FACEBOOK_APP_ID, clientSecret: FACEBOOK_APP_SECRET, callbackURL: "http://localhost:3000/auth/facebook/callback" }, function(accessToken, refreshToken, profile, done) { process.nextTick(function () { return...

Django ImageField url slow when using Amazon s3

python,django,heroku,amazon-s3,boto
In my Django Application currently running on Heroku I noticed that retrieving url's from ImageFields takes forever when hosting on s3. The application is written using Django Rest Framework. When I try to retrieve a list of objects that have image fields the response is so slow Heroku throws a...

Can someone explain how Yii minimizing assets is supposed to work on Heroku?

php,heroku,yii,yii2
I just got through getting the minification to work (How do I combine & minify JS and CSS for a Yii app on Heroku?) locally. However, it creates the all-1bc649be34b1e6afc9b2419687cde016.js file under web/assets/. Yii creates a .gitignore to ignore everything in that directory. None of the files will make it...

No module named wsgi

python,django,heroku,gunicorn,foreman
This is what I have in my Procfile: web: gunicorn --pythonpath meraki meraki.wsgi and when I do foreman start, I get this error: gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3> the reason, as far as I can see in the traceback, is: ImportError: No module named wsgi I did import...

jhipster - can't run local dev profile after deploying app to Heroku

postgresql,heroku,intellij-idea,spring-boot,jhipster
After using the jhipster generator, I am able to successfully run the app on my local webserver with a local PostgresQL. I managed to deploy it to Heroku as well, but now when I try to run it locally in IntelliJ (as I have before deployment), (selecting 'dev profile', clicking...

Download partial database from heroku

ruby-on-rails,database,postgresql,heroku,partial
I have a ruby on rails application hosted on heroku using postgresql as its database. Since the database is getting pretty large, I was wondering if there's a way to download only a specific part of it off of heroku. For example, is it possible to download only one specific...

Devise emails are not being sent using sendgrid while other emails are being sent well

ruby-on-rails-4,heroku,devise,sendgrid
I am using sendgrid to send emails in production my all other emails are being sent as expected but all the devise emails are not being sent neither a crash occur my in my production.rb I have config.action_mailer.raise_delivery_errors = false config.action_mailer.default_url_options = { :host => 'myapp.herokuapp.com' } config.action_mailer.delivery_method = :smtp...

Heroku pricing is per app or per account?

heroku,heroku-postgres
Hello for what i read in heroku pricing i understand the plan you hire is per account, what i mean is that you pay your e.g hobby plan + a basic 10m rows database, you can have up to 100 apps with that account and with the basic dyno +...

What is the best way to run a long task on Heroku with Ruby On Rails?

ruby-on-rails,ruby,heroku,background-process
I am looking for the best way to run a very long task in Heroku. I use Ruby On Rails for my web application and I have a very long task that I want to run it every week on Sunday during the night. It takes around 15~20 minutes. I...

Use Heroku binary instead of gem

ruby-on-rails,ruby,linux,heroku,installation
I have installed ruby 2.2.2 through RVM, and have also installed Heroku. I installed Heroku by downloading the most recent release from Github, installing the needed gems, and then symlinking it into /usr/bin/ so that it could be found when I needed to use the command. It worked initially, but...

On Heroku, how can I schedule the postgres database for my Rails app to be periodically reset?

ruby-on-rails,postgresql,heroku
I'm running a small demo site. I'd like to reset the database once an hour or so (automatically, not manually). I could write a rake task to destroy records for each of the models. Is there a simpler approach? How best to accomplish this?...

How can I deploy a web application onto an existing domain Meteor javascript

javascript,heroku,deployment,meteor
I am about to deploy my first client facing application built on Meteor JS. My client has a website - www.samplewebsite.com and I want to add my application's routes to that site so it would be www.samplewebsite.com/admin, www.samplewebsite.com/store, etc. instead of www.newapplication.meteor.com. I plan on using Heroku to host the...

Can we use smtp with heroku without the SendGrid add-on?

ruby-on-rails,ruby,heroku,sendgrid,add-on
I am deploying an ruby-on-rails app in Heroku.I cannot add the SendGrid add-on to the heroku account.Is there any other ways to use the email services?

Authenticating Heroku gem from rake task

ruby-on-rails,heroku,rake
I am trying to get my automatic backup script to work. I am using the heroku gem. The script is being run from Heroku's Scheduler addon. require "heroku/command/pg" require "heroku/command/pg_backups" .... def initialize @client = Heroku::Command::Pg.new([], app: ENV['APP_NAME']) end ... attachment = @client.send(:generate_resolver) ... As soon as I call attachment...

Heroku deploy of Gulp + Compass is not working at boilerplate stage

heroku,gulp,compass
I am using Gulp boilerplate from here and buildpack from here. Anyway, i just want to deploy clean boilerplate and no such code. I think it should work with just adding buildpack by heroku buildpacks:add ${url}. It doesn't work, giving me that output: C:\Users\Dawid\Desktop\Harvest>git push heroku master Counting objects: 541,...

Heroku, schedule new Dyno sleeptime

heroku,server,dyno
With the announcement of the new Dyno pricing on Heroku I had some questions about the mechanics of the new free Dyno. I was wondering if it was possible to schedule sleep time for a Dyno. This way I could make sure that my application is down while most of...

Reversing a specific Rails Migration, can't remove

ruby-on-rails,ruby,heroku,migration
class UpdateIndexOnUsers < ActiveRecord::Migration def change sql = 'DROP INDEX index_users_on_email' sql << ' ON users' if Rails.env == 'production' # Heroku pg ActiveRecord::Base.connection.execute(sql) end end I have to undo this migration. When I revert it using rake db:migrate VERSION=20150611173430,I get this error. StandardError: An error has occurred, this and...

Heroku css static file name changed

css,django,heroku
Django code serves the static css file properly locally but doesn't when pushed to Heroku. The push process includes running collectstatic, which appears to append something to the css file name. Viewing the source of the Heroku served index page is this: <link href="/static/mycssfile.cba06cddbdea.css" rel="stylesheet" type="text/css"/> The file exists on...

How to get useful errors to debug rails email on staging/production server?

ruby-on-rails,heroku,actionmailer
I've been following the Ruby on Rails Book by Michael Hartl and am trying to setup Email in production as described here. The difference is that I'm using my own cPanel server instead of heroku with the sendgrid addon. The problem is that every time I try to create a...

How do you deploy build artifacts to Heroku from Codeship?

heroku,continuous-deployment,codeship
In starting a new project, I put together the skeleton for a Node app that has tests and generates some build artifacts, like asset compilation and compression. I have the tests running in Codeship so successful builds initiate a deploy to Heroku. They've made it all super easy, except I...

Node.js on heroku, Cannot read property 'env' of undefined

javascript,node.js,heroku
I have a node server that sets the port using .listen((process.env.PORT || 5000)); which I got from the Heroku test code on Github here. This worked earlier, but now I get the following error in my Heroku logs, }).listen((process.env.PORT || 5000)); at Object.<anonymous> (/app/index.js:35:19) TypeError: Cannot read property 'env' of...

Heroku and Precompiled Assets

ruby-on-rails,ruby,heroku,assets
I have a Rails 4 app. One of my javascript assets uses ruby to get all Users. A problem arises when I try to upload to heroku. It says that it cannot precompile that asset because the database does not yet exist. What can I do short of removing that...

How log an HTTP JSON request in Loopback app deployed on Heroku?

node.js,logging,heroku,express,loopbackjs
An app (Loopback) is deployed on Heroku, and I need to to see the req body (the JSON) send to this app for debugging purpose. So the access to the log is : heroku logs --tail The server.js is like the following : var loopback = require('loopback'); var boot =...

Rails, DNSimple, Heroku and SSL - do I need a certificate?

ruby-on-rails,ssl,heroku,dnsimple
So I'm currently deploying my app via Heroku. I noticed that in my-app-name.herokuapp.com has HTTPS, so if I do config.force_ssl = true in my environments/production.rb it seems like I have wildcare SSL, right? Now I'm using DNSimple to get my actual name - call it my-app-name.com. Which currently resolves to...

Want to set custom domain to my heroku app for godaddy domain name

heroku,dns
I registered a naked domain name "passonate.com". I want set this domain to my app which is hosted on heroku. But I am not able to do it. Can you please provide solution to it.

CSS is not showing on heroku django app

django,heroku
I'm having trouble showing my CSS/Static files on my django app I just deployed on Heroku. It doesn't show any debugging errors, so I don't know where to start. Here is my code: SETTINGS_DIR = os.path.dirname(__file__) PROJECT_PATH = os.path.join(SETTINGS_DIR, os.pardir) PROJECT_PATH = os.path.abspath(PROJECT_PATH) STATIC_PATH = os.path.join(PROJECT_PATH, 'static') STATIC_ROOT = 'staticfiles'...

Change dotenv configuration when deploying to Heroku/production?

ruby-on-rails,heroku
I have an ajax call that relies on an API key as part of the request URL. I am using dotenv to hide that key. It works fine when I run it locally, but once deployed on Heroku, it gives me back a: Uncaught TypeError: Cannot read property '________' of...

Unable to send email using Action Mailer in production

ruby-on-rails,heroku,gmail,actionmailer,mandrill
I'm having some trouble sending email using ActionMailer with Gmail. I've attempted to use Mandrill but it's still not sending. When testing ActionMailer with gmail it works in development only but in production there seems to be an issue. I've tried multiple solutions but nothing seems to be working. I've...

Heroku PostgreSQL database connection pooling in Ruby for Rack with Puma

ruby,postgresql,heroku,connection-pooling,rack
UPDATE: I tried changing the storage of the PostgreSQL connection object from a constant POSTGRES to a class variable @@pg. That didn't fix the issue. Then, I tried changing it to a global variable $pg. That seems to have worked! I still would like to eventually implement database connection pooling,...

Heroku HTML static site does not allow json access?

heroku,rack
I'm using Rack::TryStatic to manage my site on Heroku. This is my config.ru file on github require "rack/contrib/try_static" require "rack/contrib/not_found" use Rack::TryStatic, { root: "_site", urls: %w[/], try: %w[ .html index.html /index.html .js .css .xml .json .eot .svg .ttf .woff .woff2 ] } run lambda{ |env| four_oh_four_page = File.expand_path("../_site/404/index.html", __FILE__)...

Transform query that works in SQLite into something that works in Postgres

ruby-on-rails,postgresql,heroku,sqlite3
Message.order("created_at DESC").where(user_id: current_user.id).group(:sender_id, :receiver_id).count Works with my dev environment SQLite3 for a Rails 3.2 app but fails when pushed to Heroku using Postgres with this error: PG::GroupingError: ERROR: column "messages.created_at" must appear in the GROUP BY clause or be used in an aggregate function It seems it wants :created_at in...

Heroku rake db:migrate failing - uninitialized constant

ruby-on-rails,ruby,heroku
My app is working fine locally and my push to Heroku was successful. But, when I run heroku run rake db:migrate, I get the following error: NameError: uninitialized constant AddWeightToExercises Here is the failed migration: class AddWeightToExercise < ActiveRecord::Migration def change add_column :exercises, :weight, :float end end edit: Thanks for...

Rails “superclass mismatch for class (TypeError)”. A well documented error, but I need some tailored advice

ruby-on-rails,inheritance,heroku
Ok. I understand why I'm getting this error. According to another StackOverflow question, "That error shows up when you redeclare a class that’s already been declared". This question seems to point out the solutions, but not quite. I have some additional questions. Here's what I have... /models/item.rb class Item <...

Application Error on new Heroku app

node.js,osx,heroku
I know this question has been answered a lot, but I still can't figure out a solution to my problem. I've created a little app which is supposed to work with the Slack webhook. Locally, it works just fine - I use node app in order to launch it. I've...

How to specify max memory for clojure heroku app?

heroku,clojure
Running a clojure app on Heroku, I've specified this in my leiningen profiles.clj :jvm-opts ^:replace ["-Xms128m" "-Xmx350m" "-Xss512k" "-XX:MaxMetaspaceSize=150m"] And I'm running my worker with lein trampoline run But, I get these errors currently: 2015-06-20T14:38:14.652680+00:00 heroku[worker.1]: Error R14 (Memory quota exceeded) 2015-06-20T14:38:34.779145+00:00 heroku[worker.1]: Process running mem=552M(107.8%) 2015-06-20T14:38:34.779145+00:00 heroku[worker.1]: Error R14...

Rails + Angular + sqlite3 Deployment

ruby-on-rails,ruby,angularjs,heroku,sqlite3
I'm a beginner for this and currently finding a free web host and has a couple of questions. Will Heroku be able to handle all of this: AngularJS, Ruby on Rails, and sqlite3? What are other good free web hosts? This is just for a personal portfolio/blog. I'm seeing several...

How to download files from git repository?

git,heroku
So I have few .mp4 files in my heroku repository. And I want to download them to my local repositroy. I'm doing it like this: git pull heroku master But it doesn't download the .mp4 files. How can I get those files?...

Bootstrap 3 Ruby app not mobile responsive

css,ruby-on-rails,twitter-bootstrap,heroku
According to my research, Bootstrap 3 is supposed to be mobile-reponsive by default. However, when I try to visit my Rails 4 app (deployed on Heroku) on my iPhone 5S, it looks exactly the same as the desktop layout (with smaller text). App: http://wheels2015.herokuapp.com Github repo: https://github.com/yamilethmedina/wheels_registration I would add...

Custom validation message (in model file) that includes a path not working

ruby-on-rails,ruby,ruby-on-rails-4,heroku,model
In the user model file I have included: validates :email, uniqueness: { case_sensitive: false, message: "You can reset your password " + link_to("here", new_password_reset_path) } On loading the page on the development server, this generates the error: undefined local variable or method `new_password_reset_path' for #<Class:0x007f4d36863460> The alternative code below has...

After deploying to heroky scripts and css not available

node.js,heroku
I am new in heroku. Locally project works fine but after deploying vendor scripts files are not available. Their paths are redirected to main page. Here is the deployed version with errors https://salty-woodland-8424.herokuapp.com/. In nodeJs file i use var express = require('express'); var path = require('path'); var stylus = require('stylus');...

mongodb (mongolab) on heroku. 'LoopBack connector “mongodb” is not installed'

node.js,mongodb,heroku
I have a nodejs app which runs fine locally. It uses mongodb. I wanted to push it to heroku, so I installed the mongolab addon, 'heroku addons:open mongolab' and updated the datasources.json file like so; { "db": { "name": "db", "url": "mongodb://<user:<pwd>@ds037252.mongolab.com:37252/heroku_app37281512", "connector": "mongodb" } } When I push it...

Issue with .gitignore/.slugignore syntax in order to exclude files

heroku,.slugignore
I am trying to use a .slugignore file to ignore certain files i.e. all jars in the lib directory. There are a certain number of files within the directory I want to exclude but my pattern only finds 8 files: Deleting 8 files matching .slugignore patterns. Contents of .slugignore (problematic...

Rails4 - How to add from name to emails sent from my rails app?

ruby-on-rails,email,ruby-on-rails-4,heroku,sendgrid
I have a rails app on heroku and I use sendgrid addon to send emails. When I receive emails from Stack Exchange in my gmail, I receive it as follows. Stack Exchange <[email protected]> But when I receive email from my website, it's like the following [email protected] via sendgrid.info How can...

Database integrity errors when deploying Python(2.7)/Django(1.5) app on Heroku

python,django,heroku,django-south,heroku-postgres
These days I'm learning Python(2.7)/Django(1.5) via developing a reddit clone. The clone is almost done and works perfectly in my local environment (db = sqlite3). But when I try to host the same thing on Heroku (db = postgres), things go awry. Specifically, the web app still loads, but the...

Can't Authenticate Auth Token When Pushed to Heroku

ruby-on-rails,authentication,heroku
I have an app that works fine on my localhost. I've set the session_store as this. Rails.application.config.session_store :cookie_store, key: '_myapp_session', domain: :all When I push to heroku every POST I make displays Can't verify CSRF token authenticity error in my log. I have no idea why this isn't working. The...

Cannot GET/ Error In Node js With Heroku

node.js,heroku
I'm working on node js backend which receives user sms from android app using telerivet webhook API.everytime when i run the app atheroku it gives me cannot GET/ error ,my code for index.js is var express = require('express'); var bodyParser = require('body-parser'); var app = express(); var WEBHOOK_SECRET = "62DZWMCCFFHTTQ44CG3WUQ94CTT7GAAN";...

Ensuring a Gradle task is executed after another task

heroku,gradle
I have the following issue with my gradle build: Heroku guarantees to execute the stage task (see below) but I need a custom cleanUp task (see below) to be executed just after the stage task. I am not sure how to achieve this... Can anyone please help? task cleanUp(type: Delete)...

Ubuntu 14.04 - An error occurred while installing pg (0.18.2), and Bundler cannot continue

ruby-on-rails,postgresql,ubuntu,heroku,sqlite3
This issue doesn't let me go ahead and I don't know whether it's possible for me to deploy my Rails App ever on Heroku. When I try bundle install by having gem 'pg' in my Gemfile it gives following error. An error occurred while installing pg (0.18.2), and Bundler cannot...

Why does my viewport look different when I deploy to heroku?

html5,mobile,heroku,responsive-design,viewport
I have a simple web app that I am deploying to heroku. In my html, I am have the meta information about the viewport: <head> <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> <title>Notify</title> <link rel="stylesheet" type="text/css" href="./app.css"> <link rel="stylesheet" type="text/css" href="./bootstrap.css"> </head> Here is my server code: var express = require('express');...

Rails hash key/value created differently in local vs heroku

ruby-on-rails,postgresql,sqlite,heroku,hash
I ran into this issue late last night and I just figured out what happened, but I want to understand why. I tested my code in my local (using sqlite) and it worked fine, but when I deployed to heroku (postgres), a summary table was not showing the right results....

Are files uploaded to heroku immediatly deleted?

ruby-on-rails,heroku
I see everywhere that heroku deletes changes you made to the filesystem once you deploy or scale your application but in my case it seems files disappear immediatly. My rails application uploads files to public/uploads and then a delayed job tries to read those files, when it tries to read...

The Mystical Ephemeral File System of Heroku is Not Letting Me Get Files from S3

ruby-on-rails,ruby,amazon-web-services,heroku,amazon-s3
So, I've been wrestling with this issue for days...I need to get a file from S3 and write it to a directory in my Rails app on Heroku. I must have a misunderstanding of the ephemeral file system on Heroku because I can't figure out why it's not working. I...

PHP Curl Login not working on Heroku

php,curl,heroku
I have a simple php script that make a login to desired webpage. It is working ok on my localhost (wamp server), but when I run it on heroku i get response like this (link: image link:) Script is simple, just like that: <?php $username = "username"; $password = "password";...

How to create a MySQL schema when deploying with Heroku (Express Server)

mysql,heroku,express,cleardb
Suppose I have the following server.js file: server.js var express = require('express'); var app = express(); var mysql = require('mysql'); var dbhelpers = require('./public/database_helpers.js') var bodyParser = require('body-parser') app.use(express.static(__dirname + '/public')); app.use(express.static(__dirname + '/public/views')); app.use(express.static(__dirname + '/public/controlers')); app.use(express.static(__dirname + '/public/lib')); app.use(bodyParser()) var connection = mysql.createConnection({ **Correct info** });...

Trying to push Rails 4.2.1 app to Heroku sqlite error

ruby-on-rails,heroku,gem
So I read the thread on that similar question, but still confused. This is my gem file. I changed all the sqlite3 gems in my gemfile to gem 'pg', '0.7.0' I changed the all the sqlite3 in the database.yml file to postgresql. I did a bundle install, and then heroku...

how to run an node npm script in deployment hook in codeship

node.js,heroku,codeship
As part of my codeship to heroku deployment hook, I'd like to run database updates/migrations before the app starts. How can I trigger an npm script or a command line script in heroku using the codeship deployment step? I tried putting it in as part of my npm start script...

Remove Heroku setting from Hubot?

heroku,hubot
I tried running Hubot on Heroku, but I gave up because I'd prefer not to give out my credit card number. Instead, I tried running Hubot on my mac. It gave an error, like this: $ ./bin/hubot hubot-sample> [Fri Jun 05 2015 11:41:52 GMT+0900 (JST)] ERROR hubot-heroku-alive included, but missing...

How to setup FTP static ip with QuotaGuard static?

node.js,heroku,ftp,static-ip-address
I'm using a nodejs FTP client that's hosted on heroku, but the endpoint I'm connected to needs to whitelist my static IP. Heroku doesn't offer static IPs so I'm using the QuotaGuard addon. I'm a bit lost on how to use the QuotaGuard url to proxy my FTP connection. I...

Not able to create staging instance on heroku [duplicate]

ruby-on-rails,git,heroku,sqlite3
This question already has an answer here: Errors of pushing rails app to Heroku error occurred while installing sqlite3, and Bundler cannot continue 3 answers I am trying to create a staging instance of my app on heroku. While I am doing git push staging master I am getting...

Heroku download pg:backups how to

postgresql,heroku,heroku-postgres
I know there are similar questions but the old Heroku's pg:backups addon has been deprecated. So, following the new docs, I get a public URL that expires after ten minutes after this command: heroku pg:backups public-url backupnumber --app appname What do I do with the public-url? I can't find a...

Can't connect to redis on heroku

ruby-on-rails,ruby,heroku,redis,sidekiq
I'm using sidekiq with active_job in my rails application. The job currently works but I am unable to get connect to the Redis when deploying to heroku. In heroku I have the RedisToGo addon. When pushing to heroku I get the following error. error /app/vendor/bundle/ruby/2.2.0/gems/redis-3.2.1/lib/redis/client.rb:331:in `rescue in establish_connection': Error connecting...