production

Running a rails server in production locally (InvalidMessage error)

一曲冷凌霜 提交于 2019-11-29 02:27:24
问题 I'm running Ruby 2.5.1 and Rails 5.2.0. I ran rails s -e production , and it gives this error: /home/roy/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/activesupport-5.2.0/lib/active_support/message_encryptor.rb:206:in `rescue in_decrypt': ActiveSupport::MessageEncryptor::InvalidMessage (ActiveSupport::MessageEncryptor::InvalidMessage) How do I do this properly? EDIT: The same error appears whenever I try to edit the credentials file using EDITOR="nano --wait" bin/rails credentials:edit Also

What's the correct way to serve production react bundle.js built by webpack?

匆匆过客 提交于 2019-11-29 01:07:03
问题 I have an app with simple routes. It works fine when I use webpack development server. Now, I want to deploy it to my production server. So I built bundle.js. However, I am not sure what's the correct way to serve the file on the server. Most blog posts stop at building bundle.js or deploy it to heroku or nodejutsu. What should I do if I want to serve it on my own server? I tried serving the file on express server, but I'm getting this error in the browser (this same route works fine with

How to build task 'assets:precompile'

一曲冷凌霜 提交于 2019-11-28 22:17:25
问题 I'm getting that error on my production server, and can't figure out why. It happens when running this command: bundle exec rake assets:precompile RAILS_ENV=production I'm using Rails 3.1.0.rc6 回答1: This is most likely due your config/application.rb not requiring rails/all (the default), but some custom requires. To resolve this, add the following to config/application.rb : require 'sprockets/railtie' 回答2: I know this is an old post but I thought it might help someone (probably my future self

Tools and methods for live-monitoring ASP.NET web applications?

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 21:58:26
问题 I think many developers know that uncomfortable feeling when users tell them that "The application is slow (again)." In a complex web application there can be many possible reasons for a degradation in (perceived) performance: slow database response, bandwidth issues, bad caching etc. There certainly are issues which will never occur in a development or staging environment. Now my question: Is there a set of tools and/or methods which would provide a comprehensive "live" state on a IIS/ASP

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

半世苍凉 提交于 2019-11-28 18:04:34
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? 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/%40angular/core/src/application_ref.ts#L58 Per the Angular Deployment guide at https://angular.io/guide/deployment

Introduction to Erlang/OTP production applications deployment

五迷三道 提交于 2019-11-28 16:51:41
问题 I would like to develop and deploy an Erlang/OTP application into production on a VPS. I am pretty familiar with developing Erlang code on a local machine and my question is about deployment. Basically, I would like to know what steps I should take in order to move Erlang code from a local machine to a production server and make it run, i.e. be available for users. Note: I have read some documentation about Erlang and command line, Erlang code module, Erlang releases, but I am still not sure

Accessing Meteor production database

≡放荡痞女 提交于 2019-11-28 15:31:40
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? 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 help command above: Instead of opening a shell, specifying --url (-U) will return a URL suitable for an

heroku: Gemfile.lock is required issue

余生颓废 提交于 2019-11-28 09:52:24
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 commit your Gemfile.lock. ! ! Heroku push rejected, failed to compile Ruby/rails app To git@heroku.com:**

What's the risk of deploying debug symbols (pdb file) in a production environment?

旧城冷巷雨未停 提交于 2019-11-28 02:53:39
I have an application that logs exception strack traces and I wanted those stack traces to include file names and line numbers when deployed in production. I figured out how to deploy the debug symbols w/ the assembly, but in the process of researching the issue I ran accross this question , which implies that it's not a good idea to include pdb files in a production environment. A comment to the accepted answer says "...debugging information can give away sensitive data and be an attack vector. Depending on what your app is." So what sort of sensitive data might be exposed? How can debug

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

社会主义新天地 提交于 2019-11-28 02:43:40
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? 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 === "undefined") { console = { log: function() { } }; } If you use any methods other than log , you would need