env

Why won't my Ruby script execute?

[亡魂溺海] 提交于 2019-12-07 18:32:25
So, I made a simply ruby script, #!/usr/bin/env ruby puts "Hello!" When I try to run it in terminal it doesn't put "Hello!" on the screen. I have tried entering chmod +x test.rb ( test.rb is the name of my file). When I run it, it doesn't give me an error, it just doesn't display "Hello!". Any help will be much appreciated. I have looked everywhere for a possible answer, and I have found nothing so far. I'd guess that you're trying to run it as just test like this: $ test But test is a bash builtin command that doesn't produce any output, it just sets a return value. If you run your script

Apache Ant 1.8 on CentOS

情到浓时终转凉″ 提交于 2019-12-07 12:06:50
问题 I am trying to get apache ant 1.8 to work under CentOS. First, I had this error. Error: Could not find or load main class org.apache.tools.ant.launch.Launcher Then I set the following variables according to this link: Ant: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher It's not CentOS, but I did verify the paths exist except JAVA_HOME, so I set it according to this site: https://serverfault.com/questions/50883/what-is-the-value-of-java-home-for

How to access laravel env variables in node js?

偶尔善良 提交于 2019-12-06 04:42:15
问题 I'm trying to access APP_KEY env variable of laravel in my socket.io server installation, but don't know how to access any of the laravel environment variables. Any help is appreciated. 回答1: check this package for node.js dotenv You can define path to .env file as require('dotenv').config({path: '/custom/path/to/laravel/'}); 回答2: If they’re defined in the .env file then you can’t: it’s a PHP package Laravel uses that reads those values and makes them available in the application. Instead, set

Insecure $ENV{ENV} while running with -T switch

青春壹個敷衍的年華 提交于 2019-12-05 19:51:28
When I try the last example from perlfaq5: How-do-I-count-the-number-of-lines-in-a-file? I get an error-message. What should I do to get the script working? #!/usr/local/bin/perl -T use warnings; use 5.012; $ENV{PATH} = undef; my $filename = 'perl2.pl'; if( $filename =~ /^([0-9a-z_.]+)\z/ ) { my $lines = `/usr/bin/wc -l $1`; print $lines; } Output: Insecure $ENV{ENV} while running with -T switch at ./perl1.pl line 10. 2nd Edition of Answer The perldoc perlsec manual describes taint mode (there is also perldoc Taint for a module related to Taint mode). In part, it illustrates: $path = $ENV{

Apache Ant 1.8 on CentOS

自古美人都是妖i 提交于 2019-12-05 19:07:52
I am trying to get apache ant 1.8 to work under CentOS. First, I had this error. Error: Could not find or load main class org.apache.tools.ant.launch.Launcher Then I set the following variables according to this link: Ant: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher It's not CentOS, but I did verify the paths exist except JAVA_HOME, so I set it according to this site: https://serverfault.com/questions/50883/what-is-the-value-of-java-home-for-centos Now I am getting the same error I did the first time. It does not matter which ant rule I use,

Whoops, looks like something went wrong. Laravel 5.1

你。 提交于 2019-12-05 04:46:24
I have a route like this http://localhost/inspection/show/{id} When I try to load the route at the same time. In different tabs, sometimes some of those tabs has the error "Whoops, looks like something went wrong" Loading in different tabs so fast http://localhost/inspection/show/8 http://localhost/inspection/show/9 http://localhost/inspection/show/10 http://localhost/inspection/show/11 The stack trace have this [2015-08-06 14:57:53] local.ERROR: exception 'RuntimeException' with message 'No supported encrypter found. The cipher and / or key length are invalid.' in C:\wamp\www\iaserver\vendor

.ENV file is visible

荒凉一梦 提交于 2019-12-05 01:20:01
I am using Laravel 5.1 I recently uploaded my project in shared hosting. but when i browse http://siteAddress.com/local/.env my .env file is visible. Is there any way to hide this file or redirect people if they want browse the site with folder view? Finally I hide .env and disable index view of the folder named local . I create a .htaccess in folder local . And here is the code of .htaccess # Disable index view Options -Indexes # Hide a specific file <Files .env> Order allow,deny Deny from all </Files> Please create a .htaccess file where you have .env file and write the code as shown below:

Passing a Fabric env.hosts sting as a variable is not work in function

不羁岁月 提交于 2019-12-04 23:49:33
问题 Passing a Fabric env.hosts sting as a variable is not work in function. demo.py #!/usr/bin/env python from fabric.api import env, run def deploy(hosts, command): print hosts env.hosts = hosts run(command) main.py #!/usr/bin/env python from demo import deploy hosts = ['localhost'] command = 'hostname' deploy(hosts, command) python main.py ['localhost'] No hosts found. Please specify (single) host string for connection: But env.host_string works! demo.py #!/usr/bin/env python from fabric.api

What are the advantages of placing data in a new.env in r?

自作多情 提交于 2019-12-04 21:16:43
What are the advantages of placing data in a new .env in R?-speed, etc. For data such as time series, is an new .env analogous to a database? My question spans initally from downloading asset prices in R where it was suggested to place them into a new .env. Why is this so? Thank you: library(TTR) url = paste('http://www.nasdaq.com/markets/indices/nasdaq-100.aspx',sep="") txt = join(readLines(url)) # extract tables from this pages temp = extract.table.from.webpage(txt, 'Symbol', hasHeader = T) temp[,2] # Symbols symbols = c(temp[,2])[2:101] currency("USD") stock(symbols, currency = "USD",

How to access laravel env variables in node js?

*爱你&永不变心* 提交于 2019-12-04 11:33:57
I'm trying to access APP_KEY env variable of laravel in my socket.io server installation, but don't know how to access any of the laravel environment variables. Any help is appreciated. check this package for node.js dotenv You can define path to .env file as require('dotenv').config({path: '/custom/path/to/laravel/'}); If they’re defined in the .env file then you can’t: it’s a PHP package Laravel uses that reads those values and makes them available in the application. Instead, set actual environment variables on your server or in your host definition. Then both your Laravel application and