title: Redmine install Apache2 Bundler PermissionError
body: <p>I am trying to install Redmine using this <a href="https://www.redmine.org/projects/redmine/wiki/HowTo_Install_Redmine_30x_on_Ubuntu_1404_with_Apache2_Phusion_Passenger_MySQL_Subversion_and_Git_%28Gitolite%29" rel="nofollow">tutorial</a>: 
  I am unfamiliar with Ruby. Whenever I go to <a href="http://localhost/redmine" rel="nofollow">http://localhost/redmine</a> or <a href="http://localhost/redmine/settings?tab=general" rel="nofollow">http://localhost/redmine/settings?tab=general</a> in my browser I get a page with the message: </p>
  
  <blockquote>
    <p>We're sorry, but something went wrong.</p>
    
    <p>We've been notified about this issue and we'll take a look at it
    shortly.</p>
  </blockquote>
  
  <p>So I decided to look in my apache2 error log: <code>sudo nano /var/log/apache2/error.log</code></p>
  
  <p>I found the following message, changed the permission of the Bundler folder to everyone, and restarted Apache. However that did not help I still get the same message in my browser. What am I doing wrong?</p>
  
  <p>Using Ubuntu 14.05</p>
  
  <p>/var/log/apache2/error.log</p>
  
  <pre><code>[ 2016-02-05 15:26:39.0461 24027/7fca480e5700 age/Cor/App/Implementation.cpp:304 ]: Could not spawn process for application /usr/share/redmine: An error occurred while starting up the preloader.
    Error ID: d4625db4
    Error details saved to: /tmp/passenger-error-yGu5Vm.html
    Message from application: Bundler::PermissionError (Bundler::PermissionError)
    /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:116:in `rescue in filesystem_access'
    /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:114:in `filesystem_access'
    /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/definition.rb:267:in `lock'
    /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/environment.rb:34:in `lock'
    /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/runtime.rb:44:in `setup'
    /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler.rb:92:in `setup'
    /var/lib/gems/2.1.0/gems/bundler-1.11.2/lib/bundler/setup.rb:18:in `&lt;top (required)&gt;'
    /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `&lt;module:App&gt;'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `&lt;module:PhusionPassenger&gt;'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `&lt;main&gt;'
  
  
  [ 2016-02-05 15:26:39.0552 24027/7fca4aaee700 age/Cor/Con/CheckoutSession.cpp:277 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is d4625db4. Please see earlier logs for details about the error.
  </code></pre>
  
  <p>In /tmp/passenger-error-yGu5Vm.html:</p>
  
  <pre><code>Bundler::PermissionError (Bundler::PermissionError)
    /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:116:in `rescue in filesystem_access'
    /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib/bundler/shared_helpers.rb:114:in `filesystem_access'
    /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib/bundler/definition.rb:267:in `lock'
    /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib/bundler/environment.rb:34:in `lock'
    /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib/bundler/runtime.rb:44:in `setup'
    /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib/bundler.rb:92:in `setup'
    /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib/bundler/setup.rb:18:in `&lt;top (required)&gt;'
    /opt/redmine/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /opt/redmine/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:430:in `activate_gem'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:297:in `block in run_load_path_setup_code'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:435:in `running_bundler'
    /usr/lib/ruby/vendor_ruby/phusion_passenger/loader_shared_helpers.rb:296:in `run_load_path_setup_code'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:100:in `preload_app'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:156:in `&lt;module:App&gt;'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:30:in `&lt;module:PhusionPassenger&gt;'
    /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `&lt;main&gt;'
  
  Error ID
      5d410186
  Application root
      /usr/share/redmine
  Environment (value of RAILS_ENV, RACK_ENV, WSGI_ENV, NODE_ENV and PASSENGER_APP_ENV)
      production
  Ruby interpreter command
  
      /usr/bin/passenger_free_ruby
  
  User and groups
  
      uid=119(redmine) gid=128(redmine) groups=128(redmine)
  
  Environment variables
  
      APACHE_PID_FILE = /var/run/apache2/apache2.pid
      rvm_bin_path = /opt/redmine/.rvm/bin
      GEM_HOME = /opt/redmine/.rvm/gems/ruby-2.1.4
      SHELL = /bin/bash
      APACHE_RUN_USER = www-data
      IRBRC = /opt/redmine/.rvm/rubies/ruby-2.1.4/.irbrc
      PASSENGER_DEBUG_DIR = /tmp/passenger.spawn-debug.XXXXVrAXrr
      MY_RUBY_HOME = /opt/redmine/.rvm/rubies/ruby-2.1.4
      rvm_stored_umask = 0022
      USER = redmine
      _system_type = Linux
      rvm_path = /opt/redmine/.rvm
      PASSENGER_USE_FEEDBACK_FD = true
      rvm_prefix = /opt/redmine
      APACHE_LOG_DIR = /var/log/apache2
      PATH = /opt/redmine/.rvm/gems/ruby-2.1.4/bin:/opt/redmine/.rvm/gems/ruby-2.1.4@global/bin:/opt/redmine/.rvm/rubies/ruby-2.1.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/redmine/.rvm/bin
      QT_QPA_PLATFORMTHEME = appmenu-qt5
      rvm_loaded_flag = 1
      PWD = /usr/share/redmine
      APACHE_RUN_GROUP = www-data
      LANG = C
      _system_arch = x86_64
      _system_version = 14.04
      rvm_version = 1.26.11 (latest)
      SHLVL = 0
      HOME = /opt/redmine
      LOGNAME = redmine
      SERVER_SOFTWARE = Apache/2.4.7 (Ubuntu) SVN/1.8.8 Phusion_Passenger/5.0.24
      GEM_PATH = /opt/redmine/.rvm/gems/ruby-2.1.4:/opt/redmine/.rvm/gems/ruby-2.1.4@global
      APACHE_LOCK_DIR = /var/lock/apache2
      APACHE_RUN_DIR = /var/run/apache2
      RUBY_VERSION = ruby-2.1.4
      rvm_user_install_flag = 1
      _system_name = Ubuntu
      IN_PASSENGER = 1
      PYTHONUNBUFFERED = 1
      NODE_PATH = /usr/share/passenger/node
      RAILS_ENV = production
      RACK_ENV = production
      WSGI_ENV = production
      NODE_ENV = production
      PASSENGER_APP_ENV = production
      RAILS_RELATIVE_URL_ROOT = /redmine
      RACK_BASE_URI = /redmine
      PASSENGER_BASE_URI = /redmine
      _ORIGINAL_GEM_PATH = /opt/redmine/.rvm/gems/ruby-2.1.4:/opt/redmine/.rvm/gems/ruby-2.1.4@global
      BUNDLE_BIN_PATH = /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/exe/bundle
      BUNDLE_GEMFILE = /usr/share/redmine/Gemfile
      RUBYOPT = -rbundler/setup
      RUBYLIB = /opt/redmine/.rvm/gems/ruby-2.1.4/gems/bundler-1.11.2/lib
  </code></pre>