heroku

insert to database error on heroku but worked locally, ActiveRecord::StatementInvalid

落爺英雄遲暮 提交于 2019-12-25 06:51:05
问题 I have 2 models: class User < ActiveRecord::Base has_many :micro_posts, :dependent => :destroy .. def add_post(post) self.micro_posts << post end class MicroPost < ActiveRecord::Base belongs_to :user ... and the migration: class CreateMicroPosts < <ActiveRecord::Migration def change create_table :micro_posts do |t| ... And when I called add_post on heroku server, I got an error: 2012-02-06T02:59:58+00:00 app[web.1]: ActiveRecord::StatementInvalid (ArgumentError: wrong number of arguments (1

Port Error on Heroku / Clojure Deployment

无人久伴 提交于 2019-12-25 06:49:25
问题 This is a follow on question to my Heroku / Clojure problem here. As outlined in that thread, I was able to push my app to Heroku's master, and that deploys it. But when I try to go to my app's URL, I get the below error. It's a bizarre port error, but I didn't think I had control over those details when deploying a Clojure app on Heroku. I think my setup's pretty straightforward. Is there anything I can do to address this error? Procfile web: lein run -m http.handler http.handler ... (def

Is it possible to redirect a url that uses HTTPS protocol? (Heroku, Rails)

▼魔方 西西 提交于 2019-12-25 06:18:21
问题 I switched my app's domain, and the redirect works for urls that use http, but I have some links lurking around on the web using HTTPS that aren't redirecting. For instance, http://myolddomain.com redirects just fine, but https://myolddomain.com results just returns a generic server error. Is it possible to redirect these links? I'm using rails 3 and heroku. UPDATE: I'm trying the rack-rewrite gem. Here's the code that I'm adding to my production environment file: #mod_rewrite using rack

Heroku + ephemeral filesystem + AWS S3

一个人想着一个人 提交于 2019-12-25 06:14:31
问题 I have developed an application that generates large files (700mb+) by using data from MySQL and then serves them to users. I am now migrating the app to Heroku. In order to upload a file to Amazon S3, that file has to be generated in the filesystem first or can be uploaded as a string since Heroku can't guarantee your file will be there (dyno might restart or fail for whatever reason). Files are going to be pretty big so multipart upload will be used (I am not sure if string uploading can be

Heroku ArgumentError ( is not a recognized provider)

不问归期 提交于 2019-12-25 05:45:28
问题 I am trying to upload profile pictures to Google Cloud using Paperclip and Fog gems. so far this what I have In my Gemfile gem "paperclip", git: "git://github.com/thoughtbot/paperclip.git" gem 'fog' In my user model has_attached_file :avatar, styles: {:big => "200x200>", thumb: "50x50>"}, storage: :fog, fog_credentials: "#{Rails.root}/config/gce.yml", fog_directory: "google-bucket-name" validates_attachment_content_type :avatar, content_type: /\Aimage\/.*\Z/ When I run this locally, I am able

Using Heroku for a Node web application

三世轮回 提交于 2019-12-25 05:36:16
问题 I am trying to set up a project on Heroku. I went through their tutorial for Node apps and I am now trying to use my repository to work on my web app. I have already created the project and it shows up on my Heroku dashboard but I can't push anything to it. This is the message I get every time: remote: Compressing source files... done. remote: Building source: remote: remote: -----> Using set buildpack heroku/nodejs remote: remote: ! Push rejected, failed to detect set buildpack heroku/nodejs

Can't create files Heroku Cedar-14

瘦欲@ 提交于 2019-12-25 05:34:10
问题 So I have an application + Application Folder | --- index.php --- folder 1 --- folder 2 I want to create a data folder outside this 'Application folder'. Problem: If I go 1 up in the tree and try to do a git push, heroku doesn't let me + 1 up from application folder | + --- Application Folder + --- Data folder And I can't ssh into the box and create a folder because it tells me it's a read only file system. FYI: The dashboard app settings say it's on cedar 14. And I'm running on a free

error regarding heroku deployment

狂风中的少年 提交于 2019-12-25 05:23:27
问题 So im in the process of deploying my code via heroku but have recently encountered 'were sorry but something went wrong' error when going to the site. Not entirely sure the cause of this Ive gone back and tried using 'heroku rake db:reset command' (that may not be verbatim) but Im a bit confused in regards to what to do to fix this. 2012-08-11T23:30:00+00:00 heroku[run.1]: Awaiting client 2012-08-11T23:30:00+00:00 heroku[run.1]: Starting process with command `bundle exec rake db:rollback`

Play 2.0 Scala Heroku instance isn't seeing every variable in the Procfile

情到浓时终转凉″ 提交于 2019-12-25 05:16:24
问题 I'm using Play! 2.0 Scala edition on Heroku. Heroku does not seem to see/use all my configuration variables in the Procfile. For instance, in my application.conf I have the following variables (amongst others): mongodb.default.db = "nyancat" mongodb.default.host = "localhost" mongodb.default.port = 27017 These should be the defaults for local development. However, I want my Heroku instance to use a MongoLabs instance. (Unfortunately, Salat doesn't configure with a URI, so I had to break it

Deploying an Anguilarjs app on Heroku using CI/CD [duplicate]

眉间皱痕 提交于 2019-12-25 05:13:10
问题 This question already has an answer here : How to host an AngularJS app in Heroku using Node.js WITHOUT using yeoman? (1 answer) Closed 2 years ago . I have made a small Angularjs based on a typical directory structure that stores source on al "src" directory and deploys to a "dist" directory. So fa I haven't had problem with code being deployed on local server as in github pages. I already built a CodeShip CI/CD instance, it runs testing fine and deploys but it crushes there. The code is