Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8607251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:18:18+00:00 2026-06-12T03:18:18+00:00

I have a Debian server and when I try and run Passenger and navigate

  • 0

I have a Debian server and when I try and run Passenger and navigate to the root directory of my app:

Error:

cannot load such file -- bundler/setup

Environment

deployment@currienet:/$ which ruby
/home/deployment/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
deployment@currienet:/$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
deployment@currienet:/$ which rails
/home/deployment/.rvm/gems/ruby-1.9.3-p194/bin/rails
deployment@currienet:/$ rails --version
Rails 3.2.8
deployment@currienet:/$ which bundle
/home/deployment/.rvm/gems/ruby-1.9.3-p194/bin/bundle
deployment@currienet:/$ gem list bundle
bundler (1.2.1)
deployment@currienet:/$ gem list passenger
passenger (3.0.17)
deployment@currienet:/$ which rvm
/home/deployment/.rvm/bin/rvm
deployment@currienet:/$ rvm --version
rvm 1.16.6 (master) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]

Apache’s passenger.load file

LoadModule passenger_module /home/deployment/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17/ext/apache2/mod_passenger.so
PassengerRoot /home/deployment/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.17
PassengerRuby /usr/local/bin/ruby

Apache’s httpd.conf

<VirtualHost *:80>
      ServerName http://currienet
      # !!! Be sure to point DocumentRoot to 'public'!
      DocumentRoot /var/www/currienet/marketplace/current/public
      <Directory /var/www/currienet/marketplace/current/public >
         # This relaxes Apache security settings.
         Allow from all
        Options -MultiViews
      </Directory>
</VirtualHost>

Bundle

deployment@currienet:/var/www/currienet/marketplace/current$ bundle show
Gems included by the bundle:
  * actionmailer (3.2.8)
  * actionpack (3.2.8)
  * activemodel (3.2.8)
  * activerecord (3.2.8)
  * activeresource (3.2.8)
  * activesupport (3.2.8)
  * arel (3.0.2)
  * bcrypt-ruby (3.0.1)
  * builder (3.0.0)
  * bundler (1.2.1)
  * cocaine (0.2.1)
  * coffee-rails (3.2.2)
  * coffee-script (2.2.0)
  * coffee-script-source (1.3.3)
  * daemon_controller (1.0.0)
  * devise (2.1.2)
  * erubis (2.7.0)
  * execjs (1.4.0)
  * fastthread (1.0.7)
  * haml (3.1.7)
  * haml-rails (0.3.4)
  * hike (1.2.1)
  * i18n (0.6.1)
  * journey (1.0.4)
  * jquery-rails (2.1.1)
  * json (1.7.5)
  * mail (2.4.4)
  * mime-types (1.19)
  * multi_json (1.3.6)
  * orm_adapter (0.4.0)
  * paperclip (3.1.2)
  * passenger (3.0.17)
  * pg (0.14.0)
  * polyglot (0.3.3)
  * rack (1.4.1)
  * rack-cache (1.2)
  * rack-ssl (1.3.2)
  * rack-test (0.6.1)
  * rails (3.2.8)
  * railties (3.2.8)
  * rake (0.9.2.2)
  * rdoc (3.12)
  * sass (3.2.1)
  * sass-rails (3.2.5)
  * sprockets (2.1.3)
  * thor (0.16.0)
  * tilt (1.3.3)
  * treetop (1.4.10)
  * tzinfo (0.3.33)
  * uglifier (1.2.7)
  * warden (1.2.1)
  * will_paginate (3.0.3)

Accounts

I have two accounts on the server: root and deployment.

My app and rvm are installed under deployment but Apache is installed under root (to be able to bind to port 80) Judging by the process list by running ps -fe passenger is being called by apache and is run under root:

root     16159 16155  0 02:08 ?        00:00:00 PassengerWatchdog
root     16165 16159  0 02:08 ?        00:00:00 PassengerHelperAgent
root     16167 16165  0 02:08 ?        00:00:00 Passenger spawn server
nobody   16172 16159  0 02:08 ?        00:00:00 PassengerLoggingAgent
www-data 16179 16155  0 02:08 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16180 16155  0 02:08 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16181 16155  0 02:08 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16182 16155  0 02:08 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 16183 16155  0 02:08 ?        00:00:00 /usr/sbin/apache2 -k start

The root account doesn’t have access to rails or bundle in the root path.

.rvmrc & config/setup_load_paths.rb

I have tried following the instructions on the The Path to Better RVM & Passenger Integration Blog and Using RVM rubies with Passenger :

Create an .rvmrc file in the root directory of my app with the command:

rvm use 1.9.3 --rvmrc --create

Which generates the file .rvmrc:

if [[ -d "${rvm_path:-$HOME/.rvm}/environments"
  && -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
then
  \. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
  [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]] &&
    \. "${rvm_path:-$HOME/.rvm}/hooks/after_use" || true
  if [[ $- == *i* ]] # check for interactive shells
  then echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
  else echo "Using: $GEM_HOME" # don't use colors in non-interactive shells
  fi
else
  # If the environment file has not yet been created, use the RVM CLI to select.
  rvm --create use  "$environment_id" || {
    echo "Failed to create RVM environment '${environment_id}'."
    return 1
  }
fi

# If you use bundler, this might be useful to you:
 if [[ -s Gemfile ]] && {
   ! builtin command -v bundle >/dev/null ||
   builtin command -v bundle | GREP_OPTIONS= \grep $rvm_path/bin/bundle >/dev/null
 }
 then
   printf "%b" "The rubygem 'bundler' is not installed. Installing it now.\n"
   gem install bundler
 fi
 if [[ -s Gemfile ]] && builtin command -v bundle >/dev/null
 then
   bundle install | GREP_OPTIONS= \grep -vE '^Using|Your bundle is complete'
 fi

And adding the following to config/setup_load_paths.rb

if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
  begin
    rvm_path     = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
    rvm_lib_path = File.join(rvm_path, 'lib')
    $LOAD_PATH.unshift rvm_lib_path
    require 'rvm'
    RVM.use_from_path! File.dirname(File.dirname(__FILE__))
  rescue LoadError
    # RVM is unavailable at this point.
    raise "RVM ruby lib is currently unavailable."
  end
end

# Select the correct item for which you use below.
# If you're not using bundler, remove it completely.

# If we're using a Bundler 1.0 beta
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
require 'bundler/setup'

And started apache by running

sudo /etc/init.d/apache2 restart

I still get the same error.

Unhelpful

I have found the following related questions to be unhelpful (but may be of use to others):

RVM and Passenger: No such file to load – bundler – resolution was leftover configurations from an old virtual host in Apache configuration files.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:18:19+00:00Added an answer on June 12, 2026 at 3:18 am

    You have

    deployment@currienet:/$ which ruby
    /home/deployment/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
    

    and

    PassengerRuby /usr/local/bin/ruby
    

    this is not what you want. rvm has an option to set up an interpreter to use as passenger’s default interpreter. https://rvm.io/integration/passenger/

    Also (seeing your last edit) maybe you needto install rvm system-wide, as passenger will run as root.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi i have a debian server. Today my site was showing Error establishing a
We have a file share on a debian server which people will be putting
I have a Debian Lenny server, from where I run my websites - Zend
I have a server with debian. Server host X vservers (for example 1vserver to
OK, here's the deal. I have Git installed on my Debian (lenny) remote server.
I have problems with Darwin Streaming server 5.5.5 on Debian. When i'm trying to
I'm running Debian on a VPS server, and have both the development and production
I have deployed the WebDav server on Debian Linux and give appropriate permission. While
I have set up WebDAv server on my Debian linux and this is working
Hy! I have a debian server with a installed mysql server. Now my problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.