production

Rails 3.1 assets pipeline in production

一世执手 提交于 2019-11-27 18:36:14
问题 I am using the assets pipeline (in Rails 3.1.3) and am kind of struggling to make it work in production. Situation In my /app/assets/stylesheets directory I have the following files: application.css --> this is the default rails one stylesheet.css --> This is my custom stylesheet I spent a lot of time getting my stylesheet.css included in the /public/assets/ directory in production (by running rake assets:precompile ) and I finally made it by adding the following line into in my application

GCM certificate configuration not working or iOS

江枫思渺然 提交于 2019-11-27 18:08:11
问题 I am facing one issue when I am trying to confiure the GCM and getting configuration file. When I am trying to upload the production certificate over the GCM portal it says " Bundle Id in certificate doesn't match with Bundle Id you entered ". I verified already for the same. Still no joy. Anyone help plz. 回答1: I tried it with both Development and Production .p12, both worked for me. You need to make sure you generate a correct .cer certificate file from your Bundle ID, and need to make sure

Create an index on a huge MySQL production table without table locking

陌路散爱 提交于 2019-11-27 17:02:38
I need to create an index on a ~5M rows MySQL table. It is a production table, and I fear a complete block of everything if I run a CREATE INDEX statement... Is there a way to create that index without blocking inserts and selects? Just wondering I have not to stop, create index and restart my system! [2017] Update: MySQL 5.6 has support for online index updates https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html In MySQL 5.6 and higher, the table remains available for read and write operations while the index is being created or dropped. The CREATE INDEX or DROP INDEX

Golang production web application configuration

纵饮孤独 提交于 2019-11-27 16:34:20
For those of you running Go backends in production: What is your stack / configuration for running a Go web application? I haven't seen much on this topic besides people using the standard library net/http package to keep a server running. I read using Nginx to pass requests to a Go server - nginx with Go This seems a little fragile to me. For instance, the server would not automatically restart if the machine was restarted (without additional configuration scripts). Is there a more solid production setup? An aside about my intent - I'm planning out a Go powered REST backend server for my next

How to use a library from a CDN in a Webpack project in production

本小妞迷上赌 提交于 2019-11-27 12:20:47
I'd like to use react.min.js from a CDN in production (e.g. https://unpkg.com/react@15.3.1/dist/react.min.js ) What is the best way to get Webpack to transform my import React from 'react' statements into const React = window.React instead of building node_modules/react into the bundle? I've been doing it with resolve.alias like this: In index.html : <head> <script type="text/javascript" src="https://unpkg.com/react@15.3.1/dist/react.min.js"></script> <script type="text/javascript" src="/assets/bundle.js"></script> </head> In webpack.prod.config.js : alias: { react$: './getWindowReact', },

How to check if Angular application running in Production or Development mode

三世轮回 提交于 2019-11-27 10:55:07
问题 This seems an easy one, but I couldn't find any solution. So, how do I check if my app is running in production mode or dev mode? 回答1: You can try this function isDevMode import { isDevMode } from '@angular/core'; ... export class AppComponent { constructor() { console.log(isDevMode()); } } One note : be carefull with this function if(isDevMode()) { enableProdMode(); } You will get Error: Cannot enable prod mode after platform setup https://github.com/angular/angular/blob/2.0.0/modules/

Accessing Meteor production database

被刻印的时光 ゝ 提交于 2019-11-27 09:15:50
问题 To check out what's in the (production) database for blah.meteor.com I thought we would just do: meteor mongo --url http://blah.meteor.com/ But instead I get a URI: mongodb://client:984dae4c-04fb-c8bb-68f6-ed83602435cc@skybreak.member1.mongolayer.com:27017/blah_meteor_com How would I use this URI to access the db? 回答1: You should use meteor mongo http://blah.meteor.com ; or even shorter meteor mongo blah.meteor.com . For documentation you can run meteor help mongo . Extract from running the

Bad idea to leave “console.log()” calls in your production JavaScript code?

為{幸葍}努か 提交于 2019-11-27 05:01:07
问题 I have a bunch of console.log() calls in my JavaScript. Should I comment them out before I deploy to production? I'd like to just leave them there, so I don't have to go to the trouble of re-adding the comments later on if I need to do any more debugging. Is this a bad idea? 回答1: It will cause Javascript errors, terminating the execution of the block of Javascript containing the error. You could, however, define a dummy function that's a no-op when Firebug is not active: if(typeof console ===

heroku: Gemfile.lock is required issue

天涯浪子 提交于 2019-11-27 03:16:31
问题 I have the following issue: I'm trying to deploy my project on heroku but after i run git push heroku master I get the following: git push heroku master -f Counting objects: 524, done. Delta compression using up to 2 threads. Compressing objects: 100% (498/498), done. Writing objects: 100% (524/524), 157.76 KiB, done. Total 524 (delta 207), reused 62 (delta 2) -----> Heroku receiving push -----> Ruby/Rails app detected ! ! Gemfile.lock is required. Please run "bundle install" locally ! and

Create an index on a huge MySQL production table without table locking

筅森魡賤 提交于 2019-11-26 22:30:27
问题 I need to create an index on a ~5M rows MySQL table. It is a production table, and I fear a complete block of everything if I run a CREATE INDEX statement... Is there a way to create that index without blocking inserts and selects? Just wondering I have not to stop, create index and restart my system! 回答1: [2017] Update: MySQL 5.6 has support for online index updates https://dev.mysql.com/doc/refman/5.6/en/innodb-create-index-overview.html In MySQL 5.6 and higher, the table remains available