gocd/documentation — pull request #9 by juniorz (2014-05-07 17:48:35+00:00)
Title: Unset GEM_HOME and GEM_PATH

There is one scenario which may cause the Rails app from the Development Server to fail.

If the user has `GEM_PATH`/`GEM_HOME` containing any version of `rake`, the Rails startup will fail with:

```
can't activate rack (~> 1.0.0, runtime) for [], already activated rack-1.5.2 for [] from file:/Users/rjunior/.m2/repository/org/jruby/rack/jruby-rack/0.9.6-b6d3d45/jruby-rack-0.9.6-b6d3d45.jar!/jruby/rack/rails.rb:50:in `require_frameworks_with_servlet_env' from /Users/rjunior/code/github/gocd/server/webapp/WEB-INF/rails/vendor/rails/railties/lib/initializer.rb:134:in `process' from /Users/rjunior/code/github/gocd/server/webapp/WEB-INF/rails/vendor/rails/railties/lib/initializer.rb:113:in `run' from /Users/rjunior/code/github/gocd/server/webapp/WEB-INF/rails/config/environment.rb:33 from /Users/rjunior/code/github/gocd/server/webapp/WEB-INF/rails/config/environment.rb:33:in `load' from file:/Users/rjunior/.m2/repository/org/jruby/rack/jruby-rack/0.9.6-b6d3d45/jruby-rack-0.9.6-b6d3d45.jar!/jruby/rack/rails.rb:33:in `load_environment' from file:/Users/rjunior/.m2/repository/org/jruby/rack/jruby-rack/0.9.6-b6d3d45/jruby-rack-0.9.6-b6d3d45.jar!/jruby/rack/rails.rb:156:in `new' from
```