environment-variables

set environment variables for system() in R?

I've been using R in Ubuntu to make system calls using system() for things like spinning up Amazon EC2 instances, managing files on S3, etc. If I start R from the command line everything works fine. But if I start R from a script using Rscript, or from ESS, I have issues with environment variables not being set. I think this is an issu...

Reliability of php HTTP_HOST & HTTP_REFERER for critical task

I'm going to develop a website in PHP. But not sure if the method i'm going to use is the best approach. There will be many addon domains for the same site. But content will be filtered based on the domain used to visit the site. For Example If a user comes from the domain siteusa.com then the content will be shown filtered accordingly ...

How to set up vsvars32 environment variables?

Hi, I'm struggling with setting my scons environment variables for visual studio 2008. Normally I do following: %VS90COMNTOOLS%vsvars32.bat or call %VS90COMNTOOLS%vsvars32.bat And this works in my shell. I try to do that in python using subprocess subprocess.call([os.environ['VS90COMNTOOLS']+r"\vsvars32.bat"]) output: d:\N\wo...

Preserving environment variables in CMake

I am working on something that requires some header files from a different source tree. For various reasons, I would like to keep these headers outside of my project and reference them during the make process. I have a CMake build script that generates my makefiles, but I would like to be able to generate makefiles with references to en...

RHEL 5 - Path Environment Variable Changes Don't Take Effect

Hello, I am having a problem in Red Hat Enterprise Linux, I'm a newb to Linux so this is probably something very simple. I installed a new 64-bit JDK (1.6.0_18) on RHEL 5 (64-bit), and now i need to set the path so that linux will go for the 1.6.0_18 instead of the old JRE 1.4.2. But everytime i set the path variable, its like the chang...

Visual Studio 2010 - How to use System Environment Variables?

Hello All, I'd really appreciate some help or ideas on a very frustrating issue. In my experience it seems that any time I need to organize or update my solutions/projects, I realize how buggy and poor the program actually is. I always end up having to find a hack or run into a nasty trial by failure that forces me start from scratch ...

Access shell environment variables Java

Does anyone know how to access the environment variables of the standard shell environment in Java? I am using the ProcessBuilder class and I have to specify specific environment variables used in a shell script I am running, these variables exist in the standard shell environment. Accessing ProcessBuilder environment does not work. ...

how to read System environment variable in Spring applicationContext

How to read the system environment variable in the application context? I want something like : <util:properties id="dbProperties" location="classpath:config_DEV/db.properties" /> or <util:properties id="dbProperties" location="classpath:config_QA/db.properties" /> depending on the environement. Can I have somethi...

How to start a brand new process in Rails, without inherit current environment variables?

I'm developing an master rails app which controls other rails apps. It has a bash script to start those rails apps, and it works well while it's invoked in the command line manually. But if I invoke it in the matter rails app, using backticks, system, or exec, the script will fail. The error message is: unicorn_rails worker[0] -c ../c...

Python: Existing environment variables which need to be added again to execute

I'm trying to execute a command which runs a program that uses perl and python. Although both of them are already in PATH, I get this error 'perl' is not recognized as an internal or external command,operable program or batch file. 'python' is not recognized as an internal or external command,operable program or batch file. So I tried o...

Shell script problem to set my env

We have few executable which need some environment setting. We manually running those scripts before running the executable Like $ . setenv.ksh We have to encompass call these in one script to avoid the manual work. We written a sh script like #!/bin/sh . setenv.ksh ./abc & Still the environments are not setting in that session...

RAILS_ENV vs Rails.env? And Why the values are different?

I have already read this question : http://stackoverflow.com/questions/2715035/rails-env-vs-rails-env I have added rails-dev-boost plugin (http://github.com/thedarkone/rails-dev-boost) and it internally uses Rails.env.development? to check and bypass its scripts if its not development. This is generally okay. But I also use Spork Testu...

Can I create Environmental variable which will take effect without logoff

I am creating an Envoirment var using a bat file and the command is below: REG ADD HKCU\Environment /v DSPATH /t REG_SZ /d %cd%\DSClient.exe This works fine but only after a logoff. Is there a way it can take effect without logging off. ...

Rails: dynamic environmental settings without magic numbers

Short version: Where should I store environment-specific IDs? ENV['some-variable']? Somewhere else? Long version: Let's say I have a model called Books and a book has a Category. (For the sake of this question, let's say a book only has one category.) class Book < ActiveRecord::Base belongs_to :category end class Category < Acti...

Internal rewrite+Setting environment variables with mod-rewrite/.htaccess

Hello, I am trying to achieve the following through mod_rewrite: 1. What is the basic directory structure? / main/ (folder) a bunch of PHP files some_folder/ (folder) another_folder/ (folder) ... (an arbitrary number of such folders) yet_another_folder/ (folder) .htaccess(the magic goes here) 2. What I am trying to do? In thi...