Questions tagged [env]

221 questions
4
votes
1 answer

Override FROM image's ENV in Dockerfile

From the following image: https://registry.hub.docker.com/u/cloudesire/activemq/dockerfile/ If I wanted to override the ACTIVEMQ_VERSION environment variable in my child docker file, I assumed I would be able to do something like the following: FROM…
James
  • 1,237
  • 4
  • 22
  • 43
4
votes
1 answer

How to create a windows cmd shell with empty environment

I want to create a windows cmd with a empty environment, meaning no env variables. What would be the easiest way to get rid of them?
Peter Kirschner
  • 927
  • 1
  • 9
  • 17
4
votes
1 answer

Env variables not loaded when invoked in rake task

In lib/tasks/sitemap.rake: namespace :sitemap do task update: :environment do Rake::Task["sitemap:generate"].execute key = ENV['AWS_ACCESS_KEY_ID'] secret = ENV['AWS_SECRET_ACCESS_KEY'] bucket = ENV['S3_BUCKET'] s3 =…
sergserg
  • 21,716
  • 41
  • 129
  • 182
4
votes
2 answers

Capistrano read from .env on deployment server

I am trying to perform a database backup as part of a Capistrano (v3) deployment script (for a NON-Rails app). The script works fine -- if I hard-code database config into it. Now I want to load in the database config from a .env file. On my local…
user3070184
4
votes
1 answer

How to handle population of env variables

While my understanding is that using environment variables for configuring applications in different deployment environments is best practice, I don't know of a good method for managing these environments and populating the variables in them. Here…
Smithamax
  • 141
  • 3
4
votes
4 answers

Processing multiple quant mod stock tickers in parallel in R

I might not explain my questions clear in the title, apologize. Here is the question with the code, it will be clearer, library(zoo);library(quantmod) stockData <- new.env()#Make a new environment for quantmod to store data in startDate =…
StayFoolish
  • 531
  • 1
  • 12
  • 29
4
votes
5 answers

Rails saving IP address with every create/update request

I'd like to do the following: define a before_filter in application.rb that extracts the user's IP address and stores it anywhere, preferably in the session. define two before filters in all my models as before_create and before_update that add…
Jason Nerer
  • 551
  • 7
  • 19
3
votes
3 answers

NGINX and environment variables from configuration file

I'm trying to set some environment variables to nginx via it's configuration file. I'm using nginx/0.8.53 and it's not working. server { listen 80; server_name localdictus; root /opt/vdmo_dictus/public; # <--- be sure to point to…
3
votes
1 answer

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

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 =…
sid_com
  • 24,137
  • 26
  • 96
  • 187
3
votes
5 answers

Saving Perl Windows Environment Keys UPCASES them

I have a framework written in Perl that sets a bunch of environment variables to support interprocess (typically it is sub process) communication. We keep a sets of key/value pairs in XML-ish files. We tried to make the key names camel-case…
Jeff Hutton
3
votes
2 answers

why env -i does not match the command manual

I have read the linux command env manual, specifically, for the -i option, the manual says: -i, --ignore-environment # start with an empty environment What I get is that when -i option is specified, the environment is empty,i.e, no environment…
Tracy
  • 1,988
  • 5
  • 25
  • 36
3
votes
1 answer

Load .env file in clojure

Is there any recommended way to load configuration inside a .env file in clojure? I've found https://github.com/rentpath/clj-dotenv and https://github.com/jackmorrill/dotenv which seemed to do what I want, but both of them are not available on…
heyarne
  • 1,127
  • 9
  • 33
3
votes
1 answer

Ruby script shebang with rbenv and uninstalled project-required version

I have a script in a Ruby application at bin/setup that begins with: #!/usr/bin/env ruby env tells what executables are accessible, and if there is a Ruby version available on $PATH, the script should use it to execute. Suppose I am using rbenv and…
Olivier Lacan
  • 2,636
  • 2
  • 24
  • 22
3
votes
2 answers

why do `#!/usr/bin/env var=val command` gets into an infinite loop

In man(1) env it say: env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...] So consider print_A.sh: #!/usr/bin/env A=b bash echo A is $A When I run it with ./print_A.sh it hangs. Running it with strace ./print_A.sh I get the following log,…
Chen Levy
  • 15,438
  • 17
  • 74
  • 92
3
votes
1 answer

Accesing environment variables with $ and ENV in ruby

I am trying to acces an environment variable set in ~/.bashrc In ~/.bashrc I have set export testdata = without the <> of course. I may add that I also tried adding testdata= to /etc/environment When I am still in the shell…
FlyingTeller
  • 17,638
  • 3
  • 38
  • 53