How do i define a second environment.rb file in rails?
My default environment.rb is overflowing, and i would like to have a separate file that works exactly the same way. How can I do so? ...
My default environment.rb is overflowing, and i would like to have a separate file that works exactly the same way. How can I do so? ...
I'm trying to find a file inside the system directory. The problem is that when using Environment.SystemDirectory On a x64 machine, i'm still getting the System32 directory, instead of the Systemwow64 directory. I need to get the "System32" directory on x86 machines, and "SystemWow64" directory on x64 Any ideas? EDIT: To find the S...
Hi. I am currently working on my own little project, but I have a little problem: I want to set the $PATH environment variable to ./bin, so that when I use exec() and similar functions, it would only search for binary files in that directory (unless I explicitly tell it otherwise). I have already tried putenv(), which won't work unless...
I have a menu, when the user clicks on any menu item, I want to take them to the same page, but I want to style the page differently depending on the menu item...for ex: change the background color to be different. What's the best way to do this? I was thinking that when they click on a menu item, a variable can be set or a session vari...
I have a program that makes calls to an internal web API. However when we're doing development work on the sites we don't want the program to call our production web API but the staging version of the Web API. What's the best way to do this in rails? I feel I should be assigning some sort of variable in development.rb and one in produ...
I have a project with several build targets. Each build target has its own default.png and previously it worked with changing the name of each of these to default.png in my run script. However with the release of iOS4 I have to modify my script in order to support the Retina Display. Is it possible to get the target device version (iOS3....
From the documentation: If the platform supports the unsetenv() function, you can delete items in this mapping to unset environment variables. unsetenv() will be called automatically when an item is deleted from os.environ, and when one of the pop() or clear() methods is called. However I want something that will work regardless of...
When I run Valgrind on my code, I get several thousand instances of 12 bytes in 1 blocks are possibly lost in loss record 545 of 29,459 at 0x7FCC050: operator new(unsigned int) (vg_replace_malloc.c:214) by 0x87E39B1: __gnu_cxx::new_allocator<T>::allocate(unsigned int, void const*) (new_allocator.h:89) ... ... From various ...
I have created a custom Rails integration environment that i use to run Selenium tests. The tests run fine in this new environment, however the problem is that within the test code, the RAILS_ENV variable is set to test. I have a test helper class which is similar to the default rails test_helper class, and defines ENV["RAILS_ENV"] = "...
On Linux $_SERVER["_"] contains path to PHP interpreter executable (for example /usr/bin/php -r 'echo $_SERVER["_"];' will print /usr/bin/php). On Windows XP with PHP 5.3 $_SERVER["_"] is NULL. ...
I have installed the JDK, to C:\jdk, the JAVA_HOME variable is set to C:\jdk\jdk, and when I echo %JAVA_HOME% I get C:\jdk\jdk. Yet Tomcat complains. The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE I seem to be having erro...
Can anybody please help me showing how to set an environment variable and start a process in ANSI C for Windows? If possible I want to avoid using any windows API for this. ...
Hi I am using PHP Java Bridgeon a windows and linux server. Now I want to modify the CLASSPATH. When I do a phpinfo(), I see a CLASSPATH under environment variables section and when I output the java.lang.system properties is have a property called java.class.path. First of all what is the difference between the two ? How do I modi...
Xcode sets variety of environment variables related build when running shell script. Is there a way to running shell script without setting of those variables? ...
I used the bundled Property List Editor of Mac OS X Developer Tools to set an environment variable DYLD_LIBRARY_PATH_64-bit to the value path/to/dylib in the file ~/.MacOSX/environment.plist. I saved this file and logged out. Upon logging back in, the console displayed multiple messages of "dyld: warning, unknown environment variable: ...
Hi, how can I get the value (path) of %APPDATA% in Micorosoft JScript? ...
I need something like this: SetEnv foo bar.baz RewriteEngine On RewriteCond %{HTTP_HOST} ^%{foo}$ RewriteRule ^(.*)$ http://www.foo/$1 [L] UPD: I have made as follows: SetEnv HOSTNAME_ENV testsite RewriteEngine On RewriteCond %{HTTP_HOST} ^%{ENV:HOSTNAME_ENV} RewriteRule ^(.*)$ http://www.%{ENV:HOSTNAME_ENV}/$1 [L,R=301] But it d...
I would like to be able to source a file to set up some environment variables, but do it so it's independent of the shell being used. For example %: source START.env # START.env if [ $SHELL == "bash" ]; then source START.env.bash # sets environment variables else source START.env.tcsh # sets environment variables fi However, t...
I've built a JAR file and it executes fine on my PC (XP) which has Eclipse installed. It also works on another PC, which also has Eclipse. I've tried running it on another PC(XP) that does not have Eclipse. Though it contains the JDK and multiple JRE. The JAR file just does not execute by clicking or from the command prompt. I am not ...
Hi everyone, I'm currently using Eclipse PDT and CodeIgniter, is it possible to get code-completion for the sessions library like so: $CI = &get_instance(); $CI->session->se (No auto-completion here.) Also, is there some sort of plug-in (or just a method) that would allow eclipse to do this for all my CodeIgniter libraries. Note: ...