Rails console is not outputting SQL Statements to my Development Log

the rails console never writes to the log file, but you can achieve it quite easily, for example, if you execute following after starting the rails console ActiveRecord::Base.logger = Logger.new STDOUT rails will log all SQL statements to stdout, thus display them in your terminal. and since Logger.new accepts any stream as first argument, you … Read more

Windows Subsystem for Linux not recognizing JAVA_HOME Environmental Variable

As Biswapriyo suggested, you should use WSLENV. Open PowerShell. Then set JAVA_HOME to the path to your java installation. In your case, run setx JAVA_HOME “D:\Program Files\Java\jdk-11.0.1″ You should see a message that says “SUCCESS: Specified value was saved”. Then run setx WSLENV “JAVA_HOME/p”. You should see the success message again. Type ‘env’ into your … Read more

How to set NODE_ENV from package.json for react

As per the docs, we cannot override NODE_ENV, but there is a room to create our own custom variables starting with REACT_APP_. So i configured to look as below: Reference: https://facebook.github.io/create-react-app/docs/adding-custom-environment-variables “staging”: “concurrently -k \”npm:staging-server\” \”cross-env REACT_APP_ENVIRONMENT=’staging’ PORT=3003 react-scripts start\””, And inside my UI application, I can fetch its value by consoling it like this: … Read more

Docker multiple environments

You could take some clues from “Using Compose in production” You’ll almost certainly want to make changes to your app configuration that are more appropriate to a live environment. These changes may include: Removing any volume bindings for application code, so that code stays inside the container and can’t be changed from outside Binding to … Read more

Node.js, express, and using development versus production in app.configure

Your approach is ok, but you can make something more generic, like storing the config data for Redis in a file or passing the host and port like arguments: node app.js REDIS_HOST REDIS_PORT Then in your app you can grab them using process.argv: app.configure(‘development’, function(){ app.use(express.errorHandler({ dumpExceptions: true, showStack: true })); var r = require(“redis”).createClient(process.argv[2], … Read more

local development of microservices, methods and tools to work efficiently

I’ve had a fair amount of experience with microservices and local development and here’s been some approaches I’ve seen: Run all the things locally on docker or k8. If using k8, then a tool like skaffolding can make it easier to run and debug a service locally in the IDE but put it into your … Read more

tech