environment

Setting up multiple development environments'm

I'm a solo developer working on a typical web project (Django + PostgresSQL) using Eclipse as my IDE and Subversion for source control. So far I've been working on a single development machine that I have setup myself. Recently, I've been asked to do some work at the customer site and there have also been a few occasions when it would ha...

How do I find the current machine's full hostname in C (hostname and domain information)?

In a C project (POSIX), how do I get the fully qualified name for the current system? For example, I can get just the hostname of my machine by doing gethostname() from unistd.h. This might give me machine3 in return, but I'm actually looking for machine3.somedomain.com for example. How do I go about getting this information? I do not ...

How can I set the Windows PATH variable from Perl?

I need to set the an environment variable from within Perl. Ideally, I need to query a variable and then change it if it is not what is required. Specifically it is the PATH variable I want to change. Can someone tell me how to get and set these variables? ...

How would you set up a python web server with multiple vhosts?

I've been told wsgi is the way to go and not mod_python. But more specifically, how would you set up your multi website server environment? Choice of web server, etc? ...

Development Environment Setup Tips

Can anyone offer tips on how to setup the ideal windows development environment? Contemplating on moving to vmware or virtual box setup for development and keeping the development tools off of my main system but then think that would cause a headaches if I want to just try something really quick. Just looking for suggestions from other...

Best way to create custom config options for my Rails app?

I need to create one config option for my Rails application. It can be the same for all environments. I found that if I set it in environment.rb, it's available in my views, which is exactly what I want... environment.rb AUDIOCAST_URI_FORMAT = http://blablalba/blabbitybla/yadda Works great. However, I'm a little uneasy. Is this a go...

Checking for workstation lock/unlock change with c#

DUPLICATE: How can I programmatically determine if my workstation is locked? How can I detect (during runtime) when a Windows user has locked their screen (Windows+L) and unlocked it again. I know I could globally track keyboard input, but is it possible to check such thing with environment variables? ...

How do I get the path of a process in Unix / Linux

In Windows environment there is an API to obtain the path which is running a process. Is there something similar in Unix / Linux? Or is there some other way to do that in these environments? ...

Rails: filter defined in lib file required in environment.rb disappears from filter_chain in production environment. Why?

Hi, In my rails application, I have a file in lib that, among other things, sets up a filter that runs on all controllers. When running under development environment, everything runs fine. However, under production the filter goes missing. Funny thing is, by inspecting the filter_chain, I noticed other filters remain, eg. those define...

Running unit tests with Nose inside a Python environment such as Autodesk Maya?

I'd like to start creating unit tests for my Maya scripts. These scripts must be run inside the Maya environment and rely on the maya.cmds module namespace. How can I run Nose tests from inside a running environment such as Maya? ...

Linker problems after switching to VS2005 from VC6 (LNK4099)

Hi, I ported one of my old projects to VS2005 and am having linker warnings such as xxxxx.lib(xxxxxxxx.obj) : warning LNK4099: PDB 'vc60.pdb' was not found with ...; linking object as if no debug info Now, I've tried rebuilding the project but the warnings won't go away. Is it really supposed to be looking for vc60.pdb and not vc8...

How do you use Team Foundation Build to build for multiple environments?

When you are using Team Foundation Build to build a project for multiple environments, do you do one build for all environments, or keep a separate build script for each environment? Think of the case when I might want the workspace version on my build server to build in DEBUG mode for QA and RELEASE mode for UAT. Should one build req...

ActiveRecord running different queries in production?

I have a class hierarchy looks like this: class Post < ActiveRecord::Base; end class Project < Post; end class ProjectDesignWall < Project; end There's a controller that fetches data like so: @projects = Project.find(:all, :include => [:project_image_photos,:user]) In development, this runs the following query, straight from the lo...

Rails not loading environment.rb correctly

I recently upgraded my application from Rails version 2.1.2 to version 2.2.2. It was tested in on development and on my staging system. When I moved to production it fails to load all the way through the environment.rb file. (Why, oh why, is it always on production!?!) Below is my environment.rb file # Be sure to restart your web serve...

Setting an environment variable in javascript

How can I set an environment variable in WSH jscript file that calls another program? Here's the reduced test case: envtest.js ---------- var oShell = WScript.CreateObject("WScript.Shell"); var oSysEnv = oShell.Environment("SYSTEM"); oSysEnv("TEST_ENV_VAR") = "TEST_VALUE"; oExec = oShell.Run("envtest.bat", 1, true); envtest.bat ---...

Java 32-bit vs 64-bit compatibility

Will Java code built and compiled against a 32-bit JDK into 32-bit byte code work in a 64-bit JVM? Or does a 64-bit JVM require 64-bit byte code? To give a little more detail, I have code that was working in a Solaris environment running a 32-bit JVM, but now I'm getting issues after upgrading the JDK and Weblogic Server to 64-bit. ...

How do I run a program with a different working directory from current, from Linux shell?

Using a Linux shell, how do I start a program with a different working directory from the current working directory? For example, I have a binary file helloworld that creates the file hello-world.txt in the current directory. This file is inside of directory /a. Currently I am in directory /b. I want to start my program running ../a/hel...

uninitialized constant ActionController::Dispatcher::MiddlewareStack

I installed some new gems for testing and ran into an uninitialized constant ActionController::Dispatcher::MiddlewareStack error. I followed the instructions on the gem rdocs-specified the gem dependency in my environment.rb file and then ran rake gems:install and rake gems:unpack. I also copied over my environment.rb file one line at ...

How does one set up collaborative work for a project?

I am looking for the environment or process that should be used to set up a collaborative project. It would seem that one must protect oneself from certain on-line elements (who simply are out to cause problems) and attempt to find through some sort of process the most appropriate collaborators. Obviously, I have never tried to set up ...

Website/Webservice deployment environment diff/monitor?

My companies' system is build from a collection of ASP.NET websites, webservices, windows services and databases. (around 40 all told) We maintain three environments - QA, PREPROD and LIVE; but managing what is installed (and working) on each environment is a real pain. We seem to spend more time debugging what is installed & working ...