Questions tagged [env]

221 questions
3
votes
2 answers

Laravel 5.0.33 loads wrong .env file

I use Laravel 5.0.33 and i have the following folders on my server: /var/www/laravel_dev/ /var/www/laravel_stage/ /var/www/laravel_production/ They each have their own .env file and database, but for some reason each of them sometimes loads the…
DalekSall
  • 385
  • 1
  • 2
  • 12
3
votes
0 answers

Capistrano - Setup ENV Variables from unicorn file

My server has the environment variables in /etc/default/unicorn... how can I execute this file from capistrano? I am unable to run rake db:migrate. namespace :setup do desc "Setup environments variables." task :set_env do on…
Bruno Quaresma
  • 9,457
  • 7
  • 32
  • 50
3
votes
2 answers

What is a good way to source a Bash script from within Python?

I have a basic sourcing function: def source( fileName = None, update = True ): pipe = subprocess.Popen(". {fileName}; env".format( fileName = fileName ), stdout = subprocess.PIPE, shell = True) data =…
d3pd
  • 7,935
  • 24
  • 76
  • 127
3
votes
2 answers

anaconda virtual env imports modules from global

Working in Windows PowerShell, I created a virtual environment within Anaconda using >create conda -n test python=2.7.8 I activated it using >activate test activating environment "test"... The test env contains no packages. Python is the only…
user4216624
3
votes
1 answer

How do the environment variables work within cloud9

I want a safe way to store the username and password of an API without other people seeing it within my cloud9 Ruby on Rails app. Is it safe to save them as environment variables? I know my c9 code is public but are these variables also public? How…
Christoph
  • 1,347
  • 2
  • 19
  • 36
3
votes
1 answer

How to pass a variable with whitespace to env interpreter

I have this interpreter, which prints the ARGS variable: #!/bin/bash echo "[$ARGS]" I use this interpreter in another script: #!/usr/bin/env ARGS=first interpreter Calling the second script, I get [first] How do I get [first second] ?
elsamuko
  • 668
  • 6
  • 16
3
votes
1 answer

Access worker environment from master (Node.js Cluster)

I fork workers in my Node.js application via the Cluster module and pass a custom ID to the environment of all my workers. That works well for far. However, I do not know how I can access this id in my master when an 'online' or 'exit' event is…
1nsane
  • 1,017
  • 2
  • 12
  • 21
3
votes
1 answer

sed (on osx Snow Leopard) with BRE '.' doesn't match character > ascii 127

I'm running sed on Mac Os X Snow Leopard. sed is/should be BSD sed (man page is dated 2005-05-10) man page states: The sed utility is expected to be a superset of the IEEE Std 1003.2 (``POSIX.2'') specification. When I'm trying a replacement, and…
liselorev
  • 73
  • 4
3
votes
2 answers

setting shebang for python scripts with python path

I have a script for which I am trying to set up shebang so that I execute ./script.py instead of python script.py. This works for me when it is the topmost line of my script #!/usr/bin/env python. This uses env. when I tried to do change…
brain storm
  • 30,124
  • 69
  • 225
  • 393
3
votes
1 answer

Python with and without environment

What is the difference between these two lines? #!/usr/bin/python #!/usr/bin/env python
Hans-Helge
  • 1,764
  • 3
  • 14
  • 21
3
votes
2 answers

Nagios doesn't get exports from /etc/profile

I've got Nagios and Oracle sqlplus client installed on my server. Sqlplus needs few environment variables for its run, so I added exports to /etc/profile. Login as root sets variables right, login as user nagios sets is also OK but when I run some…
Jakub Turcovsky
  • 2,096
  • 4
  • 30
  • 41
3
votes
1 answer

Apache Ant 1.8 on CentOS

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…
BullShark
  • 85
  • 2
  • 4
  • 12
3
votes
2 answers

What's the difference of the command output after inputting the command "env", "export", "set" under Bash Shell in Solaris?

OS: Solaris Shell: Bash Shell Scenario: Input the commands separately: "env", "export" and "set" (without any arguments) and there will be a list of variables and values returned. My question: What's the difference among the returned values after…
KevinLeng
  • 1,843
  • 2
  • 12
  • 7
3
votes
2 answers

Multi-staging environment for Rails with Nginx

I have created new environment "staging". Locally it works. I run it this way: RAILS_ENV=staging passenger start On server I use Nginx + passenger. In virtual host settings I have written: server { listen 443; server_name …
Vasilina
  • 335
  • 3
  • 11
3
votes
3 answers

List all environment variable names in busybox

Environment variables with multiline values may confuse env's output: # export A="B > C=D > E=F" #…
spatar
  • 550
  • 1
  • 5
  • 15