title: Ruby on Rails: Error `require': cannot load such file -- bundler/setup (LoadError)
body: <p>I'm trying to set up redmine on an managed server. Redmine installation works, I can start the rails server and visit the redmine page localy with lynx.
  Integration in the Apache is done via FCGI and when I enter the redmine start page in my browser I get an Server error 500. In the server logs I see this:</p>
  
  <pre><code>Feb 18 01:17:12 dedi444 apache: /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
  Feb 18 01:17:12 dedi444 apache:         from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  Feb 18 01:17:12 dedi444 apache:         from /usr/www/users/admin/redmine/config/boot.rb:4:in `&lt;top (required)&gt;'
  Feb 18 01:17:12 dedi444 apache:         from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  Feb 18 01:17:12 dedi444 apache:         from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  Feb 18 01:17:12 dedi444 apache:         from /usr/www/users/admin/redmine/startup.rb:1:in `&lt;main&gt;'
  Feb 18 01:17:12 dedi444 apache: /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler/setup (LoadError)
  Feb 18 01:17:12 dedi444 apache:         from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  Feb 18 01:17:12 dedi444 apache:         from /usr/www/users/admin/redmine/config/boot.rb:4:in `&lt;top (required)&gt;'
  Feb 18 01:17:12 dedi444 apache:         from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  Feb 18 01:17:12 dedi444 apache:         from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  Feb 18 01:17:12 dedi444 apache:         from /usr/www/users/admin/redmine/startup.rb:1:in `&lt;main&gt;'
  Feb 18 01:17:18 dedi444 apache: [Tue Feb 18 01:17:18.386071 2020] [fcgid:info] [pid 31847:tid 140048663593024] mod_fcgid: process /usr/www/users/admin/test/dispatch.fcgi(3096) exit(communication error), terminated by calling exit(), return code: 1
  </code></pre>
  
  <p>I searched for the errormessage other answers recommended an <strong>bundle install</strong> - output is</p>
  
  <pre><code>...
  Bundle complete! 27 Gemfile dependencies, 58 gems now installed.
  Gems in the groups development, test and rmagick were not installed.
  Bundled gems are installed into `/usr/home/admin/.gem`
  </code></pre>
  
  <p><strong>EDIT</strong>
  additional info: I continued searching for answers, maybe the GEM_PATH is the problem and ruby can't find the bundle/setup. 
  My fcgi script looks like this:</p>
  
  <pre><code>#!/bin/dash                                                                                                                                       
  export GEM_HOME="$HOME/.gem/ruby/2.3.0/"
  export GEM_PATH="$GEM_HOME:/var/lib/ruby/gems/1.8"
  exec /usr/bin/ruby /usr/www/users/admin/redmine/startup.rb
  </code></pre>
  
  <p>How can I find the location of the 'bundle/setup' on my system?</p>
  
  <p>Any idea what I can do?</p>
  
  <p>Thanks a lot
  Klaus</p>