heroku

How to use Selenium Webdriver on Heroku?

只谈情不闲聊 提交于 2020-01-12 05:41:21
问题 I am developing a Node.js app, and I use Selenium Webdriver on it for scraping purposes. However, when I deploy on Heroku, Selenium doesn't work. How can I make Selenium work on Heroku? 回答1: I was able to get the Selenium Webdriver working on Node/Heroku using PhantomJs as the headless browser. I installed the PhantomJs buildpack to my Heroku app and it just worked. I struggled to get Chrome and Firefox drivers working on Heroku... I wrote a blog with the steps and code I used to get it

Redirect https://example.com to https://www.example.com: Namecheap and Heroku

夙愿已清 提交于 2020-01-12 03:31:11
问题 I'm trying to redirect all requests to: https://example.com http://www.example.com http://example.com to https://www.example.com . I'm using Heroku and Namecheap. Here are my steps: In Heroku, I added www.example.com to my domains, and enabled SSL. On Namecheap, I created a CNAME record with host www to www.example.com.herokudns.com. On Namecheap, I created a URL Redirect record with host @ to https://www.example.com/ . With these steps, everything works well as long as I redirect http

Running npm scripts conditionally

眉间皱痕 提交于 2020-01-11 19:42:40
问题 I have 2 main build configurations - dev and prod. I push updates to a heroku server that run npm install --production to install my app. In the package.json I have the following segment: "scripts": { "postinstall": "make install" } that runs a make file that is responsible for uglifying the code and some other minor things. However, I don't need to run this makefile in development mode. Is there any way to conditionally run scripts with npm?.. Thanks! 回答1: You can have something like this

ActiveRecord::StatementInvalid: PG::ReadOnlySqlTransaction: - Heroku database still read only even after unfollow

时光毁灭记忆、已成空白 提交于 2020-01-11 11:56:12
问题 I wanted to copy a database from one app to another in heroku. I have an issue with indexes forcing me to do this using a follower db and then unfollowing. My problem is that now after creating the follower, unfollowing, and promoting it i'm getting an error when trying to write to it: ActiveRecord::StatementInvalid: PG::ReadOnlySqlTransaction: ERROR: cannot execute ALTER TABLE in a read-only transaction Also, when I run: SELECT pg_is_in_recovery(); I get true What I did was: heroku addons

Node app with Python module in project on Heroku not installing

此生再无相见时 提交于 2020-01-11 06:45:08
问题 I have a Node (Express server) project deployed to Heroku which runs fine, but I have a small Python module I wrote that doesn't need a server or new Heroku instance, but it needs to install some 3rd party packages from pip. My problem is that while Python seems to run fine (a print() works in .py file perfectly) it doesn't install the modules. I ran pip freeze and added the requirements.txt file to the root of my project. The file looks like: funcy==1.6 numpy==1.10.2 scipy==0.16.1 But when I

Heroku django project read-only file system

梦想与她 提交于 2020-01-11 05:07:06
问题 I'm deploying django project on heroku, it works fine, but in django admin, when i'm trying to upload image i got error: OSError at /admin/blocks/block/add/ [Errno 30] Read-only file system: '/home/goldwedd' 回答1: This is by design. Your app is compiled into a slug for fast distribution by the dyno manager. The filesystem for the slug is read-only, which means you cannot dynamically write to the filesystem for semi-permanent storage. The following types of behaviors are not supported: Caching

activeadmin heroku stylesheet config issue with partial fix

天涯浪子 提交于 2020-01-11 02:04:27
问题 I was receiving the following error message after precompiling my assets locally and then pushing the code to Heroku: 2012-03-28T17:06:01+00:00 app[web.1]: Started GET "/admin/login" for 67.163.67.203 at 2012-03-28 17:06:01 +0000 2012-03-28T17:06:01+00:00 app[web.1]: 2012-03-28T17:06:01+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: active_admin/mixins. 2012-03-28T17:06:01+00:00 app[web.1]: Load paths: 2012-03-28T17:06:01+00:00 app[web.1]: /app 2012-03

activeadmin heroku stylesheet config issue with partial fix

依然范特西╮ 提交于 2020-01-11 02:04:08
问题 I was receiving the following error message after precompiling my assets locally and then pushing the code to Heroku: 2012-03-28T17:06:01+00:00 app[web.1]: Started GET "/admin/login" for 67.163.67.203 at 2012-03-28 17:06:01 +0000 2012-03-28T17:06:01+00:00 app[web.1]: 2012-03-28T17:06:01+00:00 app[web.1]: ActionView::Template::Error (File to import not found or unreadable: active_admin/mixins. 2012-03-28T17:06:01+00:00 app[web.1]: Load paths: 2012-03-28T17:06:01+00:00 app[web.1]: /app 2012-03

heroku db:pull does not work?

╄→尐↘猪︶ㄣ 提交于 2020-01-11 01:33:06
问题 I get the following error message: heroku db:pull --debug postgres://USERNAME:PASSWORD@localhost/test Loaded Taps v0.3.23 Warning: Data in the database 'postgres://USERNAME:PASSWORD@localhost/test' will be overwritten and will not be recoverable. Receiving schema Unable to fetch tables information from http://heroku:foo9dsfsdfsdb465ar@taps19.heroku.com. Please check the server log. The command above does not produce any messages in the log that can be viewed using 'heroku logs'. Any idea what

Redistogo and Sidekiq on Heroku: Can't connect

坚强是说给别人听的谎言 提交于 2020-01-10 18:55:33
问题 I had huge issues with starting sidekiq on Heroku after updating my gems and putting everything into production. The problem was that Sidekiq tried to connect to Redis on a local connection and port, instead of using the REDISTOGO variable. After spending a few hours, I managed to fix it: Answer below. 回答1: Remove everything from the if and below and run this: heroku config:set REDIS_PROVIDER=REDISTOGO_URL Sidekiq will automatically use it. 回答2: I looked up the correct, new connection that