RE: How to change IIS environment

You’re kinda stuck because of the way IIS works.

To set the environment, just hard code it in environment.rb where it
says to set it… It says something about “only set this if you can’t
set it from your server.”

I’ve successfully set this up on IIS with virtual directories but I have
to hack routes.rb and environment.rb in order to make it work properly.
It seems to run pretty fast…

http://wiki.rubyonrails.com/rails/pages/HowtoSetupIIS

And I’m praying to the Rails gods that they’ll come up with a fix for
this:

http://dev.rubyonrails.com/ticket/2602

Actually, I was able to set the RAILS_ENV variable under the system
variables and it seems to do the trick. Production log is produced and
the production database setting is used.

The one thing to note is that trying to run the console still tries to
use the development settings and the looking at ENV[‘RAILS_ENV’]
shows development.

I do have another problem though. I can’t seem to get my “” route to
work. IIS keeps complaining that it wont display the directory
contents. I think I need to add something to the re-write rules for
it, but not sure what.