Thursday, January 3, 2008

Ruby Gems not loaded on SERVAGE HOSTING

Jan 03 - 12:42 GMT
Customer

gem list
/usr/bin/gem:9:in `require': no such file to load -- rubygems (LoadError) from /usr/bin/gem:9

It seems like you don't have ruby gems loaded and therfor also fcgi won't work

Jan 03 - 12:52 GMT
Customer


I JUST asked some PROFIS in the Rubyforge Forum and here their answer:

Stunned.

Now I am wondering why Redmine (and any rails app) works there even by cgi.

I think that this you need to solve via support. Ask them about gem list and whether rails app will work via fcgi at all...
--------------------------
My Reply:
--------------------------
That's what I have just done. It seems that No GEMS at all are available. But why is cgi working? - Perhaps a hidden GEM ;-) alibi GEM (like we provide Ruby on Rails Hosting at Servage :-)
--------------------------
Check it our here:
http://rubyforge.org/forum/forum.php?thread_id=20474&forum_id=7505
--------------------------
You better solve this Problem as fast as possible and Install or Reinstall all GEMS

Thanks

Jan 03 - 12:56 GMT
Customer

You are advertising a working RUBY on RAILS Surrounding and it seems that it isn't at all working in fcgi Mode. But Thru your FAQ you make People believe you have fcgi working with RoR. I would call this NOT GOOD and I am pretty sure that German Judges would think the same way!!! Because of this we already lost 3 WEEKS!!!
So Hurry up and install a PROPER RoR Surrounding TODAY - IMMEDIATELY and think about how you can get this "ERROR" for us also solved in a KULANZ (ask Steffan your sysadmin he knows what I mean) way. Time is Money and we lost 3 WEEKS TIME!

Jan 03 - 13:15 GMT
Customer


If you don't know how to Contact your Business Owner have a look here for Steffan and Servage Hosting GmbH
http://apapococ.blogspot.com/2007/12/please-inform-owner-your-boss-about.html

Jan 03 - 15:45 GMT
Servage - Rick

Hello Andreas,

Thank you for submitting ticket.

We have forwarded your issue to our admin, they will get back to you with solution.


Kind regards,
Rick, Servage - Support
Servage Hosting

Jan 04 - 05:07 GMT
Customer

Thanks a lot. since fcgi is working the pages really "hurry up" and are pretty fast on Servage Hosting - WOW now you are heading upwards :-)

FCGI at SERVAGE HOSTING is not working anymore

Jan 03 - 12:11 GMT
Customer

http://redmine.t3pack.info
here the .htaccess
------------------------------
# General Apache options
AddHandler fastcgi-script .fcgi
AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

ErrorDocument 500 "

Application error

Rails application failed to start properly"
-------------------------
here dispatch.fcgi:
-------------------------
#!/usr/bin/ruby

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

RailsFCGIHandler.process!
-------------------------

With the cgi enabled instead the fcgi the page is working perfectly but very very slow!
-------------------------
here the dispatch.cgi
-------------------------
#!/usr/bin/ruby

require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)

require "dispatcher"

ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
Dispatcher.dispatch
--------------------------
The page http://www.t3log.info - is working in cgi mode (Production Site)
The page http://redmine.t3pack.info - is working in fcgi mode (Test Site) Please try to get THIS Site working and then we can copy the settings to the Production site. Thanks!

Jan 03 - 12:13 GMT
Servage - Scott

Hello Andreas,

Forwarding ticket to admin.

Kind regards,
Scott, Support
Servage Hosting

Jan 03 - 12:14 GMT
Servage - Scott

Forwarding support ticket to [Servage - Jan]

Jan 03 - 12:43 GMT
Customer

scott we are a bit further as it seems that RUBY Gems isn't get loaded at Servage Hosting - see other Ticket according Ruby Gems.

Jan 03 - 17:35 GMT
Servage - Jan

Hello Andreas,

thanks for your ticket,
I we had some Ruby issues on the cluster your account is served by today due to a RUBY update last night in preparation of an upcomming Rails update.
I have just fixed that Ruby issue.
Additionally the MySQL password in the config/databaseyml file was wrong so I fixed this too.
We are very for any inconvenience this caused.


Kind regards,
Jan, System Administrator
Servage Hosting

Jan 04 - 05:09 GMT
Customer

It is really bad that it took our whole Christmas Time to solve this problem, but now the pages really speed up using fcgi. Thanks a lot! Now can start talking about cooperation and promotion! :-)

SENDING EMAIL FROM RUBY APPLICATION ON SERVAGE HOSTING

Jan 03 - 03:32 GMT
Customer

We are receiving this error while sending email notifications from redmine (or any other ruby application)
------------
An error occurred while sending mail (Connection refused - connect(2))
------------
this meesage differs from application to application of course but is caused by the same error.

we have created an Email Address in your control panel for those notification mails.
----------------
YOU FAQ SAYS:
----------------
Error 'Sender address rejected: Access denied'

When using our SMTP server this error indicates that the address you use as sender address is not registered on your Servage account. E.g. when using sending mail from user@example.com it is important that the sender address user@example.com is an account on our servers.
----------------
As we have created noreply-red(at)t3log.info and it is existing on your account it should work ;-)

================
How to create a new e-mail account?

Here is a guide how to create a new e-mail account:

Please click on the "E-mail Accounts" tab in the left menu in the control panel. Please select the domain name you would like to create an e-mail account for and click on the "Create New Mail Account" tab in the left menu. Please fill out the form and click on the "create account" button.

Now all your login details will appear. You are able to access this site with the account details at any time via the control panel ("E-mail Accounts" please click on the "Existing E-Mail Accounts" tab).
=========================
That is exactly what we have done

-------------------------

Jan 03 - 05:39 GMT
Servage - Victor

Hello Andreas,

Please provide us the folder and file where you have uploaded the mail code to send mails via the smtp that we can check further.


Kind regards,
Victor, Servage Support
Servage Hosting

Jan 03 - 05:43 GMT
Customer

1_redmine is the ruby installation

Jan 03 - 05:51 GMT
Customer

SORRY BUT WHAT ARE YOU DOING

OUR REDMINE IS COMPLETLY GONE!!!
We are in the middle of a important Customer Project - so please put it back IMMEDIATELY. http://www.t3log.info

Jan 03 - 05:56 GMT
Servage - Victor

Hello Andreas,

We havenot made any changes in your account.
Please check your files/folders in the directory:
/1_redmine/public.


Kind regards,
Victor, Servage Support
Servage Hosting

Jan 03 - 06:12 GMT
Customer

U R G E N T S I T E I S D O W N - WE are in the middle of a big confernece!!!

Jan 03 - 06:20 GMT
Customer

OK it's back but please be more casreful in future! Thanks

And now try to solve the mailing Problem without getting the site down

Jan 03 - 07:51 GMT
Customer

OK we have setup a test account to test REDMINE on SERVAGE

http://redmine.t3pack.info

If you call
http://redmine.t3pack.info Redmine shows up

If you call
http://redmine.t3pack.info/ You get a list of files showing up

WHY what is going on here on Servage

None of the Subpages gets directed.
In the original Site ALL subpages get directed
http://www.t3log.info

WHY

Jan 03 - 07:58 GMT
Customer

Hi Now all connections are working fine, but still cgi. We can test now here the EMAIL Functionality without disturbing the production site Thanks

Jan 03 - 08:04 GMT
Customer

Sorry but now all Subpages are gone again

What is going up at SERVAGE HOSTING

Jan 03 - 08:08 GMT
Customer

OK it is back again

Why is it so unstable???

Jan 03 - 08:09 GMT
Customer

Yeah just I wrote its OK
and they are GONE now again

Can't you fix this constantly

Jan 03 - 11:50 GMT
Customer

Page is working again but still no response to the email problem therfore this ticket will be closed unsatisfied and published.

REDMINE - Mysql::Error in AccountController#register

#28000Access denied for user 'redminedevelopdb'@'10.6.46.2'
(using password: YES)

SOLUTION:

=========
Check your Database Entries in database.yml -
usually the mentioned database has got the wrong password
Change it to the right one :-)

REDMINE - Errno::ENOENT in WelcomeController#index

No such file or directory - /tmp/mysql.sock
TRIAL 1
=======
In database.yml you delete all database entries beside your production site:
RESULT:
The page will be blank!

TRIAL 2
=======
Adding "socket: /tmp/mysql.sock" to database.yml (production)
RESULT:
No change

Trial 1 + Trial 2
=============
RESULT:

Application error

Rails application failed to start properly
Putting back all other database entries into database.yml (Redo TRIAL 1)
RESULT:
Same Error as at the beginning shows up

>> It seems to do something with the database entries

TRIAL 3
=======
Putting Password in database.yml in "password" with " "
RESULT:
No changes at all

TRIAL 4
======
Entering Data for dev database in database.yml
RESULT:
The complete REDMINE site shows up perfectly

TRIAL5
======
Deleting "socket: /tmp/mysql.sock" to database.yml (production)
RESULT:
The Pages still show up perfectly

------------------------------------------
FINAL RESULT
------------------------------------------
It seems like REDMINE needs at least 2 databases assigned.
The passwords and connection entries in each database are completly different
- different connection settings "mysql_***" as on servage you are using no localhost
- different databases
- same or different passwords (both working)

REDMINE Owner/Permissions on Servage Hosting

Permission denied ...
this error message appears often on Servage Hosting Spaces. You can solve the problem in setting the right owner/permission. Try to avoid 777 - instead you should use "webserver" as owner.

The following folders need to be set to "webserver"
  1. files (otherwise you can't upload files)
  2. log
  3. tmp
If you receive this:
  1. Errno::EACCES in ProjectsController#add_document
    then your files folder is not set to "webserver"

FCGI is still not working at SERVAGE HOSTING

Jan 02 - 16:01 GMT
Customer

Hi Servage.
Meanwhile since a day we are waiting for a clear solution ho you will get your fcgi up and running. It is still not working. WE would like to change from cgi to fcgi as sid in you wiki, but we can't as you still haven't solved the fcgi problem since this morning.

i.e. http://www.t3log.info is running in cgi as fcgi will simply output textfiles instead of processing them You better check this.

Jan 02 - 17:31 GMT
Servage - Steven

Hello Andreas,

Thanks for submitting the ticket.

Can you please let us know the link for fcgi for the domain t3log.info? So, that we can check this for you. All I have checked that fcgi is enabled on the server you are on.

Hope this helps!

Kind regards,
Steven, Support
Servage Hosting
Jan 03 - 01:56 GMT
Customer



I have already written 2 times the link but after submitting we didn't got any answers back for days!!!.
Check your FAQ as it is written down there!
I guess you should know where your fcgi is placed and actually it should be enabled on ALL clusters you are offering as you advertise full fcgi support not only for several clusters.

It seems like your support again has no idea about what they are doing. That is so sad for Servage to have such a poor support.

Simply go to t3log.info

then you see that the domain points to 1_redmine
now check this folder 1_redmine
here you will find the rakefile like in all ruby installations and lots of subfolders like in all ruby installations. Here you ALWAYS need to check the PUBLIC folder (it is again the same in all ruby installations) and inside this public folder you will find the .htaccess and the dispatch.cgi and dispatch.fcgi and dispatch.rb files.

Usually you don't need to change these files and they are also the same in all ruby installations.

the code is like this (simply compare it with your FAQ):
===================================
.htaccess
-----------------------------------
# General Apache options
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

# If you don't want Rails to look in certain directories,
# use the following rewrite rules so that Apache won't rewrite certain requests
#
# Example:
# RewriteCond %{REQUEST_URI} ^/notrails.*
# RewriteRule .* - [L]

# Redirect all requests not available on the filesystem to Rails
# By default the cgi dispatcher is used which is very slow
#
# For better performance replace the dispatcher with the fastcgi one
#
# Example:
# RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
RewriteEngine On

# If your Rails application is accessed via an Alias directive,
# then you MUST also set the RewriteBase in this htaccess file.
#
# Example:
# Alias /myrailsapp /path/to/myrailsapp/public
# RewriteBase /myrailsapp

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
#RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

# In case Rails experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
#
# Example:
# ErrorDocument 500 /500.html

ErrorDocument 500 "

Application error

Rails application failed to start properly"
=====================================
As you can see we had to DISABLE fcgi to get redmine working
RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
#RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

if you change the # to the cgi rewrite the dispatch.fcgi won't get parsed at all and it will appear as textfile in your browser!
#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

perhaps your fcgi isn't installed perfectly.

=====================================
dispatch.cgi
-------------------------------------
#!/usr/bin/ruby

require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT)

# If you're using RubyGems and mod_ruby, this require should be changed to an absolute path one, like:
# "/usr/local/lib/ruby/gems/1.8/gems/rails-0.8.0/lib/dispatcher" -- otherwise performance is severely impaired
require "dispatcher"

ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun)
Dispatcher.dispatch
==================================

==================================
dispatch.fcgi
----------------------------------
#!/usr/bin/ruby

#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off). A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
# # Default log path, normal GC behavior.
# RailsFCGIHandler.process!
#
# # Default log path, 50 requests between GC.
# RailsFCGIHandler.process! nil, 50
#
# # Custom log path, normal GC behavior.
# RailsFCGIHandler.process! '/var/log/redmine_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

RailsFCGIHandler.process!
===================================

All those files have been posted already quite often ;-)

I hope to get a resonse very soon, as we need this trouble ticket solved before we can open another one. Thanks Andi!

Jan 03 - 02:01 GMT
Customer

you will find these files here:
Current path: /1_redmine/public
Jan 03 - 02:19 GMT
Customer

biblio.t3pack.info - also a basic RoR Application for testing isn't working with fcgi either. It also works at the moment only with cgi:
Here its files
Current path: /www/RoR_biblio/public

=====================================
.htaccess
-------------------------------------
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI

RewriteEngine On

RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ dispatch.cgi [QSA,L]
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]

ErrorDocument 500 "

Application error

Rails application failed to start properly"
======================================
It is actually the same like on t3log.info ;-) but here I enabled fcgi instead of cgi so you can see what happens if you enable fcgi. OUR t3log.info site is in PRODUCTION so I can't demonstrate it here!!!

======================================
dispatch.fcgi
--------------------------------------
#!/usr/bin/ruby
#
# You may specify the path to the FastCGI crash log (a log of unhandled
# exceptions which forced the FastCGI instance to exit, great for debugging)
# and the number of requests to process before running garbage collection.
#
# By default, the FastCGI crash log is RAILS_ROOT/log/fastcgi.crash.log
# and the GC period is nil (turned off). A reasonable number of requests
# could range from 10-100 depending on the memory footprint of your app.
#
# Example:
# # Default log path, normal GC behavior.
# RailsFCGIHandler.process!
#
# # Default log path, 50 requests between GC.
# RailsFCGIHandler.process! nil, 50
#
# # Custom log path, normal GC behavior.
# RailsFCGIHandler.process! '/var/log/myapp_fcgi_crash.log'
#
require File.dirname(__FILE__) + "/../config/environment"
require 'fcgi_handler'

RailsFCGIHandler.process!
-------------------------------------

You can also check: biblio.t3pack.info to read the fcgi as it gets displayed on the screen instead getting parsed ;-)

Jan 03 - 07:52 GMT
Customer

HI we are waiting since hours for a soultion of the FCGI Problem and an answer from you!!!

Jan 03 - 11:49 GMT
Customer

Waiting since over 12 Hours for a response so we need to close this ticket as unsatisfied in all cases. > will be published again like usual