function( ) {
objMenuRequirementProducts.colPr.empty( );
} ).call( this );
VM149:2 Uncaught ReferenceError: objMenuRequirementProducts is not defined
const objVal = { current: 0, deffault: 1 };
const arrKey = [1,2,3];
const aObj = new function(arr, obj) {
arr.forEach( v => Object.assign(this, { [v]: obj } ) );
}(arrKey, objVal);
let objMenuRequirementProducts = undefined;
$( document ).on( 'turbolinks:load', ( ) => {
const elemMenuRequirementProducts = $( '#menu_requirement_products_new' );
if ( elemMenuRequirementProducts.length ) {
objMenuRequirementProducts = new MenuRequirementProducts( elemMenuRequirementProducts );
}
} );
RACK_ENV=production
PORT=8085
HOST=0.0.0.0
RAILS_MAX_THREADS=30
SECRET_KEY_BASE=61beef9b0a4775ea354cb22
RACK_ENV=development
PORT=8084
HOST=0.0.0.0
RAILS_MAX_THREADS=10
@ECHO OFF
REM SET Env=production
SET Env=development
TITLE RELEASE -%Env%- [8084]
@ECHO ON
CD D:\ProjectRuby\portal && foreman start --env .env.%Env% --procfile Procfile.%Env%
\
rails runner filetest.rb
Тогда все нормально