WebFaction
Community site: login faq

Ok, I am getting a really weird error now. I am using rails 4.1 with ruby 2.0 and I am getting the following error

There was an error in your Gemfile, and Bundler cannot continue. (Bundler::GemfileError)
  /home/nathanvda/gems/gems/bundler-1.2.3/lib/bundler/dsl.rb:12:in `rescue in evaluate'
  /home/nathanvda/gems/gems/bundler-1.2.3/lib/bundler/dsl.rb:6:in `evaluate'
  /home/nathanvda/gems/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
  /home/nathanvda/gems/gems/bundler-1.2.3/lib/bundler.rb:144:in `definition'
  /home/nathanvda/gems/gems/bundler-1.2.3/lib/bundler.rb:112:in `setup'
  /home/nathanvda/gems/gems/bundler-1.2.3/lib/bundler/setup.rb:17:in `<top (required)>'
  /usr/local/lib/ruby20/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require'
  /usr/local/lib/ruby20/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
  /usr/local/lib/ruby20/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
  /home/nathanvda/webapps/quaestio/gems/gems/passenger-4.0.2/lib/phusion_passenger/loader_shared_helpers.rb:212:in `run_load_path_setup_code'
  /home/nathanvda/webapps/quaestio/gems/gems/passenger-4.0.2/helper-scripts/rack-loader.rb:69:in `load_app'
  /home/nathanvda/webapps/quaestio/gems/gems/passenger-4.0.2/helper-scripts/rack-loader.rb:96:in `<module:App>'
  /home/nathanvda/webapps/quaestio/gems/gems/passenger-4.0.2/helper-scripts/rack-loader.rb:4:in `<module:PhusionPassenger>'
  /home/nathanvda/webapps/quaestio/gems/gems/passenger-4.0.2/helper-scripts/rack-loader.rb:3:in `<main>'

I can deduce the cause from this log, but not the fix ;)

It is obvious that it starts the incorrect bundle version. If I go to my app-folder, and set PATH and GEM_HOME correctly, I get bundler version 1.6.2.

Yet somehow my nginx/passenger does not pick that up.

My nginx.conf looks as follows (and afaik it is correct) :

env               GEM_HOME=/home/nathanvda/webapps/quaestio/gems;
worker_processes  1;

events {
    worker_connections  1024;
}

http {
    access_log  /home/nathanvda/logs/user/access_quaestio.log  combined;
    error_log   /home/nathanvda/logs/user/error_quaestio.log   crit;

    include         mime.types;
    passenger_root  /home/nathanvda/webapps/quaestio/gems/gems/passenger-4.0.2;
    passenger_ruby  /home/nathanvda/webapps/quaestio/bin/ruby;
    sendfile        on;

    passenger_max_instances_per_app  1;
    rails_spawn_method               conservative;
    passenger_max_pool_size 2;

    server {
        listen             23175;
        passenger_enabled  on;
        root               /home/nathanvda/webapps/quaestio/current/public;
        server_name        localhost;
        rails_env          production;

    }
}

Now what does seem missing: does it set the $PATH correctly?

I tried setting the PATH using

env               PATH=/home/nathanvda/webapps/quaestio/bin:$PATH;

but then I got Bad Gateway error. Doh.

Any suggestions?

asked 12 May '14, 09:00

nathanvda
7510
accept rate: 0%


After reviewing your account, I believe that there is a GEM_HOME environment variable set for your account that caused the new "quaestio" application to be installed incorrectly.

Please try commenting that out variable in your .bash_profile, then try deleting and re-creating your "quaestio" application.

permanent link

answered 12 May '14, 19:41

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×186
×4
×2

question asked: 12 May '14, 09:00

question was seen: 3,567 times

last updated: 12 May '14, 19:41

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM