View previous topic :: View next topic |
Author |
Message |
questionaire Tux's lil' helper
Joined: 01 May 2006 Posts: 131
|
Posted: Thu Mar 01, 2007 9:50 am Post subject: Ruby on Rails |
|
|
hi there,
trying to enable ruby on rails framework on my webserver
followed the tutorial on gentoo-wiki.com but it doesnt really work.
first of all mod_fastcgi is masked, so i emerged mod_fcgid
I'm Adding a Handler for .fcgi with these lines in modules/70_mod_suphp.conf
Quote: | AddType application/fcgid-script .fcgi
AddHandler fcgid-script .fcgi
SuPHP_AddHandler fcgid-script |
Apache is starting with -D FCGID, no entries in the log files, it always gives me the dispatch.fcgi file for download
Do you have any ideas?
//edit:
heres the url if you want to have a look
http://web0.itsbserver.org/test/public/ |
|
Back to top |
|
|
questionaire Tux's lil' helper
Joined: 01 May 2006 Posts: 131
|
Posted: Thu Mar 01, 2007 1:37 pm Post subject: |
|
|
i'm glad that i made it, that it is now parsed by fcgid mod, but it still can't be loaded - error logs show me something weird:
Quote: | [Thu Mar 01 14:36:34 2007] [notice] mod_fcgid: server /data/www/web0/html/test/public/dispatch.fcgi(22171) started
[Thu Mar 01 14:36:34 2007] [error] [client 193.170.110.250] Premature end of script headers: dispatch.fcgi
[Thu Mar 01 14:36:37 2007] [notice] mod_fcgid: process /data/www/web0/html/test/public/dispatch.fcgi(22171) exit(communication error), terminated by calling exit(), return code: 107
|
|
|
Back to top |
|
|
vandien Tux's lil' helper
Joined: 03 May 2006 Posts: 137
|
Posted: Thu Mar 01, 2007 2:40 pm Post subject: |
|
|
Here are the steps I took to install lighttpd/rails/mongrel a couple days ago. It seems to be working well so far, though I'm not quite an expert yet. From what I've read, the preferred setup is no longer to use fastcgi, but to use http proxy in a frontend server (apache/lighttpd) to a backend (mongrel/lighttpd). The backend is brainless to set up with rails and is all you need for development/testing. I'm not sure how it will work in production yet.. It has crashed twice on me (due to bad code on my part) but I assume there's something in place to make it come back automatically for production use. Anyways, here's what I did:
/etc/portage/package.keywords: | # rails
www-servers/lighttpd
dev-ruby/rails
dev-ruby/actionwebservice
dev-ruby/actionpack
dev-ruby/activesupport
dev-ruby/rubygems
dev-ruby/activerecord
dev-ruby/actionmailer
dev-libs/fcgi
dev-ruby/sqlite3-ruby
# mongrel
dev-ruby/fastthread
dev-ruby/cgi_multipart_eof_fix
dev-ruby/daemons
www-servers/mongrel |
/etc/portage/package.use: | www-servers/lighttpd fastcgi
dev-ruby/rails fastcgi sqlite3 |
Then "emerge rails mongrel" and as a normal user "rails PROJECT -d sqlite3"
and you're on your way. I really like Rails so far :)
Edit: I just realized at the moment I'm not using the lighttpd stuff and I'm not sure it would even get emerged. So it can be left out of the /etc/portage/ files. Same with fcgi probably. |
|
Back to top |
|
|
|