Project

General

Profile

Where To Start Ruby trying to load older version gems?

Added by Hisao Tsujimura about 9 years ago

Hi,

I have the following situation.
I googled, looked at FAQs but maybe my keywords are not right on search.

My question here is what do I need to collect and look for further troubleshooting.

I set up Redmine on port 5000. When I try to open http://my_redmine_server:5000, it returns the following error.

Application error
Rails application failed to start properly

So, I checked Apache and Redmine logs.

/var/apache2/2.2/logs# tail -4 redmine.org_error.log
[Thu Mar 19 23:51:15 2015] [warn] [client <client IP#1>] (146)Connection refused: mod_fcgid: error reading data from FastCGI server
[Thu Mar 19 23:51:15 2015] [error] [client <client IP#1>] Premature end of script headers: dispatch.fcgi
[Fri Mar 20 12:16:49 2015] [warn] [client <client IP#2>] (146)Connection refused: mod_fcgid: error reading data from FastCGI server
[Fri Mar 20 12:16:49 2015] [error] [client <client IP#2>] Premature end of script headers: dispatch.fcgi

/var/apache2/2.2/logs# tail -5 error_log
/usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- bundler/setup (LoadError)
        from /usr/ruby/1.8/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:31:in `require'
        from /var/apache2/2.2/htdocs/redmine/public/../config/boot.rb:6
        from /var/apache2/2.2/htdocs/redmine/public/dispatch.fcgi:3:in `require'
        from /var/apache2/2.2/htdocs/redmine/public/dispatch.fcgi:3

Now there is Ruby 1.8 installed, but here's my path.

/var/apache2/2.2/logs# env | egrep 'PATH|GEM'
LD_LIBRARY_PATH=:/dtank/general/install/lib
PATH=/dtank/general/install/bin:/dtank/general/install/lib:/usr/lib:/usr/bin:/usr/sbin:/usr/mysql/5.5/bin:/usr/mysql/5.5/lib:/usr/mysql/mysql/bin:/usr/mysql/mysql/lib:/opt/csw/bin:/opt/csw/lib
GEM_PATH=/dtank/general/install/lib/ruby/gems/2.0.0

dispatch.fcgi is as below


/dtank/general/install/redmine/public# more dispatch.fcgi
#!/usr/bin/env ruby

require File.dirname(__FILE__) + '/../config/boot'
require File.dirname(__FILE__) + '/../config/environment'

class Rack::PathInfoRewriter
  def initialize(app)
    @app = app
  end

  def call(env)
    env.delete('SCRIPT_NAME')
    parts = env['REQUEST_URI'].split('?')
    env['PATH_INFO'] = parts[0]
    env['QUERY_STRING'] = parts[1].to_s
    @app.call(env)
  end
end

Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application)

What would be the next step for troubleshooting? Any links or comments would be really appreciated.

Hisao