Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ruby on Rails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
questionaire
Tux's lil' helper
Tux's lil' helper


Joined: 01 May 2006
Posts: 131

PostPosted: Thu Mar 01, 2007 9:50 am    Post subject: Ruby on Rails Reply with quote

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
View user's profile Send private message
questionaire
Tux's lil' helper
Tux's lil' helper


Joined: 01 May 2006
Posts: 131

PostPosted: Thu Mar 01, 2007 1:37 pm    Post subject: Reply with quote

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
View user's profile Send private message
vandien
Tux's lil' helper
Tux's lil' helper


Joined: 03 May 2006
Posts: 137

PostPosted: Thu Mar 01, 2007 2:40 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum