Project

General

Profile

Can't make fcgi or cgi work in shared hosting

Added by cu cio almost 14 years ago

First of all, it is shared hosting, so fcgid or cgi seem to be the only options. No Passenger, Mongrel, etc.

I have the thing almost working, but I need one last push.

I have setup everything as described by the installation guide, to the point I can launch redmine via webrick and browse it with lynx within a ssh session, since port 3000 can't be accessed from the outside. So far so good.

Now I have read a good deal of pages about how to set up dispatch.fcgi, .htaccess and config/environment.rb. Among others, some relevant how-to's here and Muriel Salvan's excellent how-to for installing Redmine in Sourceforge:

http://weacemethod.sourceforge.net/wiki/index.php?title=HowToInstallRedmineSF.NET

However I must be particularly dense, because I can't make it work after a few days trying.

To rule out problems with the apache server I have resorted to run the dispatchers from a ssh session with the following results:

bash-3.2$ ./dispatch.cgi
./../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/root/redmine/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:22:in `__send__': undefined method `env_table' for nil:NilClass (NoMethodError)
from /root/redmine/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:22:in `dispatch_cgi'
from /root/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:101:in `dispatch_cgi'
from /root/redmine/vendor/rails/actionpack/lib/action_controller/dispatcher.rb:27:in `dispatch'
from dispatch.cgi:12
bash-3.2$

bash-3.2$ ruby dispatch.fcgi
/root/redmine/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/root/redmine/vendor/rails/actionpack/lib/action_controller/mime_type.rb:80: warning: already initialized constant PDF
/root/redmine/vendor/rails/actionpack/lib/action_controller/mime_type.rb:80: warning: already initialized constant PNG
bash-3.2$

Fcgi just exits silently, other than the warnings.

The server runs debian lenny and provides:

ruby1.8 1.8.7.72-3lenny1
libfcgi-ruby1.8 0.8.7-4.1

I have installed locally rubygems 1.3.7, plus the following local gems:

actionmailer (2.3.5)
actionpack (2.3.5)
activerecord (2.3.5)
activeresource (2.3.5)
activesupport (2.3.5)
rack (1.0.1)
rails (2.3.5)
rake (0.8.7)

Redmine's is the 1.0.3 tarball, and the about script produces:

GEM_HOME="/gems" RAILS_ENV="production" /root/redmine/script/about/root/redmine/script/../config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
About your application's environment
Ruby version 1.8.7 (x86_64-linux)
RubyGems version 1.3.7
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Edge Rails revision unknown
Application root /root/redmine
Environment production
Database adapter mysql
Database schema version 20100819172912

Most support pages I have read on similar issues end up simply giving up, at best switching to Passenger or proxying to Mongrel.

Could someone please throw me a bone here, please? Is it really that problematic to get rails stuff playing nice with fcgi that most people simply give up?

Cheers,

Cu


Replies (1)

RE: Can't make fcgi or cgi work in shared hosting - Added by Felix Schäfer almost 14 years ago

cu cio wrote:

Is it really that problematic to get rails stuff playing nice with fcgi that most people simply give up?

Yes.

    (1-1/1)