1
votes

I get the error:

no such file to load -- bundler/setup

You can see the next image atachment:

enter image description here

However my bundle is installed fine. If I run from redmine/config/ the command

 bundle install --without development test postgresql sqlite

I get:

Using rake (10.0.3) 
Using i18n (0.6.1) 
Using multi_json (1.5.0) 
Using activesupport (3.2.11) 
Using builder (3.0.0) 
Using activemodel (3.2.11) 
Using erubis (2.7.0) 
Using journey (1.0.4) 
Using rack (1.4.4) 
Using rack-cache (1.2) 
Using rack-test (0.6.2) 
Using hike (1.2.1) 
Using tilt (1.3.3) 
Using sprockets (2.2.2) 
Using actionpack (3.2.11) 
Using mime-types (1.19) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.4.4) 
Using actionmailer (3.2.11) 
Using arel (3.0.2) 
Using tzinfo (0.3.35) 
Using activerecord (3.2.11) 
Using activeresource (3.2.11) 
Using coderay (1.0.8) 
Using rack-ssl (1.3.3) 
Using json (1.7.6) 
Using rdoc (3.12) 
Using thor (0.17.0) 
Using railties (3.2.11) 
Using jquery-rails (2.0.3) 
Using mysql2 (0.3.11) 
Using net-ldap (0.3.1) 
Using ruby-openid (2.1.8) 
Using rack-openid (1.3.1) 
Using bundler (1.2.3) 
Using rails (3.2.11) 
Using rmagick (2.13.1) 
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

This is my ruby -v:

ruby 1.9.3p374 (2013-01-15 revision 38858) [i686-linux]

This is my rails -v:

Rails 3.2.11

I have installed redmine with ubuntu 12 last version and is working fine, but with ubuntu 10.04 I get this error

This is my apache default conf:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/redmine/public
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/redmine>
                RailsBaseURI /redmine
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog /var/log/apache2/error.log
        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn
        CustomLog /var/log/apache2/access.log combined
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
</VirtualHost>

My gem env:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.22
  - RUBY VERSION: 1.9.3 (2012-02-16 patchlevel 125) [i686-linux]
  - INSTALLATION DIRECTORY: /home/ubuntu/.rvm/gems/ruby-1.9.3-p125@rails32
  - RUBY EXECUTABLE: /home/ubuntu/.rvm/rubies/ruby-1.9.3-p125/bin/ruby
  - EXECUTABLE DIRECTORY: /home/ubuntu/.rvm/gems/ruby-1.9.3-p125@rails32/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86-linux
  - GEM PATHS:
     - /home/ubuntu/.rvm/gems/ruby-1.9.3-p125@rails32
     - /home/ubuntu/.rvm/gems/ruby-1.9.3-p125@global
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - http://rubygems.org/

This is my passenger.conf

<IfModule mod_passenger.c>
  PassengerRoot /usr
  PassengerRuby /usr/bin/ruby
  PassengerDefaultUser www-database
</IfModule>

when I run ps -fe i get:

root     28771     1  0 06:00 ?        00:00:00 /usr/sbin/apache2 -k start
root     28783 28771  0 06:00 ?        00:00:00 /usr/lib/phusion_passenger/ApplicationPoolServerExecutable 0 /usr/lib/phusion_passenger/passenger-spawn-server  /usr/bin
root     28784 28783  0 06:00 ?        00:00:35 Passenger spawn server                                                                                                  
www-data 28789 28771  0 06:00 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 28790 28771  0 06:00 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 28791 28771  0 06:00 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 28792 28771  0 06:00 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 28793 28771  0 06:00 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 28800 28771  0 06:00 ?        00:00:00 /usr/sbin/apache2 -k start

Where is the problem?

Thank you!

2
Seems you don't have bundler installed at all. Make sure you run gem install bundle before running bundle install ...mathieugagne
I have installed bundle. This is not the problem. Thank you!hyperrjas

2 Answers

4
votes

Your Passenger is trying to start Redmine using another Ruby than your 1.9.3-p374. As you can see from the stacktrace, it tries to use some Ruby 1.8 (which is probably installed by system packages).

To change that, you have to configure your Passenger to use your custom Ruby.

1
votes

Vhost example

ServerName bug.domain.com DocumentRoot /srv/redmine/public

    PassengerRuby /path/to/ruby-x.y.z/bin/ruby
    <Directory /srv/redmine/public>
            AllowOverride all
            Options -MultiViews
    </Directory>

Locate the ruby executable

First, go to your redmine directory:

cd /srv/redmine
gem env | grep -i exec

For instance I got

RUBY EXECUTABLE: /home/me/.rvm/rubies/ruby-2.0.0-p195/bin/ruby
EXECUTABLE DIRECTORY: /home/me/.rvm/gems/ruby-2.0.0-p195/bin

Apache

Finally add the directive PassengerRuby /path/to/ruby to your vhost and reload your apache config.