Jentgen Georges jr.
2006-May-08 19:39 UTC
[Rails] Ruby on Rails on Linux - Any suggestions/Help?
Hi, I''m really new to RoR and I''m trying to setup a development or even production server for Ruby on Rails. I''m trying to do it on Linux Debian, but somehow, I always get this Error: Application Error - Rails application failed to start properly This was running on Debian Linux, Apache2, Mysql and FastCGI. The Tutorial I used: http://o9y.net/archives/2006/02/17/ruby-on-rails-mittels-mod_fcgi-fur-apache -2-unter-debian/ (German) Well, I installed everything as described in one of those many tutorials on the net, but I don''t get it to work. Maybe someone has some tips I schould do to get it work? Or maybe someone might tell me what Setup might be the best on Linux??? I always worked with Debian, but I could switch to any other if someone tells me which might be the best for this task. Thanks -Georges -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060508/09e5ad73/attachment.html
Ben Reubenstein
2006-May-08 19:43 UTC
[Rails] Ruby on Rails on Linux - Any suggestions/Help?
Check your logs, development.log for rails and the apache logs. Try your app in webrick. ~ Ben On 5/8/06, Jentgen Georges jr. <georges.jentgen@chello.at> wrote:> > > > Hi, I''m really new to RoR and I''m trying to setup a development or even > production server for Ruby on Rails. > > I''m trying to do it on Linux Debian, but somehow, I always get this Error: > > > > Application Error - Rails application failed to start properly > > > > This was running on Debian Linux, Apache2, Mysql and FastCGI. > > The Tutorial I used: > http://o9y.net/archives/2006/02/17/ruby-on-rails-mittels-mod_fcgi-fur-apache-2-unter-debian/ > (German) > > > > Well, I installed everything as described in one of those many tutorials on > the net, but I don''t get it to work. > > > > Maybe someone has some tips I schould do to get it work? Or maybe someone > might tell me what Setup might be the best on Linux??? > > I always worked with Debian, but I could switch to any other if someone > tells me which might be the best for this task. > > > > Thanks > > > > -Georges > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Ben Reubenstein 303-947-0446 http://www.benr75.com
Please list versions you are running: ruby -v rails -v I would suggest getting ruby installed, then install gems, then use gems to install rails. Test your ruby on rails install with webrick, a small web server written in ruby that comes with rails. This will tell you that Ruby and Rails are installed and working. Once Ruby, gems, and Rails are installed and working, then start on Apache, MySQL, and FastCGI. This seperation of steps will make it more clear where the problem(s) lies. Good Luck, -Sean
Jentgen Georges jr.
2006-May-08 20:28 UTC
[Rails] Ruby on Rails on Linux - Any suggestions/Help?
Well, It seems that there might be a problem with my FastCGI installation for Apache. This is in my log/error.log from my rails Project: FastCGI: incomplete headers (0 bytes) ruby 1.8.2 (2005-04-11) [i386-linux] Rails 1.1.2 -Georges -----Original Message----- From: rails-bounces@lists.rubyonrails.org [mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Ben Reubenstein Sent: Montag, 8. Mai 2006 21:44 To: rails@lists.rubyonrails.org Subject: Re: [Rails] Ruby on Rails on Linux - Any suggestions/Help? Check your logs, development.log for rails and the apache logs. Try your app in webrick. ~ Ben On 5/8/06, Jentgen Georges jr. <georges.jentgen@chello.at> wrote:> > > > Hi, I''m really new to RoR and I''m trying to setup a development or even > production server for Ruby on Rails. > > I''m trying to do it on Linux Debian, but somehow, I always get this Error: > > > > Application Error - Rails application failed to start properly > > > > This was running on Debian Linux, Apache2, Mysql and FastCGI. > > The Tutorial I used: >http://o9y.net/archives/2006/02/17/ruby-on-rails-mittels-mod_fcgi-fur-apache -2-unter-debian/> (German) > > > > Well, I installed everything as described in one of those many tutorialson> the net, but I don''t get it to work. > > > > Maybe someone has some tips I schould do to get it work? Or maybe someone > might tell me what Setup might be the best on Linux??? > > I always worked with Debian, but I could switch to any other if someone > tells me which might be the best for this task. > > > > Thanks > > > > -Georges > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- Ben Reubenstein 303-947-0446 http://www.benr75.com _______________________________________________ Rails mailing list Rails@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails
antonio rodriguez
2006-May-09 06:23 UTC
[Rails] Ruby on Rails on Linux - Any suggestions/Help?
Jentgen Georges jr. escribi?:> Well, > > It seems that there might be a problem with my FastCGI installation for > Apache. This is in my log/error.log from my rails Project: > > FastCGI: incomplete headers (0 bytes) > > > > ruby 1.8.2 (2005-04-11) [i386-linux] > Rails 1.1.2Hi Georges, I use Debian/testing (2.6.8-2-386) and I have a protocol to set up an application with virtual hosts (Apache) Is in spanish (don''t have too much time in this moment to translate it, sorry) see it attached below: 1. Tomamos como ejemplo el tutorial Four days on rails 2. Como root en /var/www/: #rails ToDo 3. Con el phpnyadmin creamos la base de datos ''todos'' y la tabla ''categories'' 4. En /var/www/ToDo/ (de ahora en adelante ~/ToDo) hacemos: #ruby script/generate scaffold category 5. Editamos ~/ToDo/config/database.yml y ponemos: development: adapter: mysql database: todos username: root password: socket: /var/run/mysqld/mysqld.sock 6. Editamos ~/ToDo/public/.htaccess y quitamos el s?mbolo ''#'' de las l?neas sgtes.: RewriteCond %{REQUEST_URI} ^/notrails.* RewriteRule .* - [L] RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] RewriteEngine On Dejamos el resto tal como est? 7. En /etc/apache2/sites-available/default introducimos al final: <VirtualHost *> ServerName todo DocumentRoot /var/www/ToDo/public ErrorLog /var/www/ToDo/log/apache.log <Directory /var/www/ToDo/public/> Options +ExecCGI +FollowSymLinks AddHandler fcgid-script .fcgi AllowOverride all Order allow,deny Allow from all </Directory> </VirtualHost> 8. En /etc/apache2/apache2.conf quitamos el s?mbolo ''#'' de la l?nea: AddHandler fastcgi-script .fcgi .fcg .fpl 9. No olvidar reiniciar el servidor apache cuando hagamos cualquier cambio: #apache2ctl restart 10. No olvidar a?adir en /etc/hosts el nombre del nuevo host (todos) y tampoco de los permisos en /var/www/todos/ de forma: chmod -R 777 * /todos Hope this helps Antonio
Gregory Seidman
2006-May-09 12:52 UTC
[Rails] Ruby on Rails on Linux - Any suggestions/Help?
On Mon, May 08, 2006 at 09:39:48PM +0200, Jentgen Georges jr. wrote: } Hi, I''m really new to RoR and I''m trying to setup a development or even } production server for Ruby on Rails. } } I''m trying to do it on Linux Debian, but somehow, I always get this Error: } } Application Error - Rails application failed to start properly } } This was running on Debian Linux, Apache2, Mysql and FastCGI. Apache2 does not play nicely with mod_fastcgi. You need mod_fcgid. Conveniently, this involves just apt-get install libapache2-mod-fcgid. } The Tutorial I used: } http://o9y.net/archives/2006/02/17/ruby-on-rails-mittels-mod_fcgi-fur-apache-2-unter-debian/ (German) [...] I don''t know German, I''m afraid, but it appears that the tutorial is having you build mod_fastcgi yourself. I''m not sure why, since it is available precompiled as a Debian package. More to the point, it doesn''t work particularly well with Apache2. } Maybe someone has some tips I schould do to get it work? Or maybe someone } might tell me what Setup might be the best on Linux??? Apache2 is fine. Debian is great. MySQL... eh, to each his own. FastCGI is a good choice in other environments, but you need mod_fcgid. A quick Google search for mod_fcgid and rails gives a number of pages with useful information. That said, here''s what I have in /etc/apache2/sites-available/default (note that this is for an app running at a path on a main server rather than as its own virtual host, as shown on the Alias line): <IfModule mod_fcgid.c> DefaultInitEnv RAILS_ENV production Alias /bookmarkfeeds /home/gss/work/ruby/bookmarkfeeds/public <Directory "/home/gss/work/ruby/bookmarkfeeds/public"> Options ExecCGI +FollowSymLinks AllowOverride All order allow,deny allow from all RedirectMatch ^/bookmarkfeeds/$ /bookmarkfeeds/feeds/ RedirectMatch ^/bookmarkfeeds$ /bookmarkfeeds/feeds/ </Directory> </IfModule> Note that those last two RedirectMatch lines are specific to my app, and don''t apply in general. And yes, I am running it out of my home directory, because I feel like it. In addition, I had to modify the RAILS_ROOT/public/.htaccess file to change the following two lines (they are not contiguous in the file): AddHandler fastcgi-script .fcgi RewriteRule ^(.*)$ dispatch.cgi [QSA,L] ...to... AddHandler fcgid-script .fcgi RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] Finally, since I have this running at /bookmarkfeeds instead of at / I needed this line in the .htaccess file as well: RewriteBase /bookmarkfeeds } I always worked with Debian, but I could switch to any other if someone } tells me which might be the best for this task. There will always be people who think that their system is better than yours. I can assure you that it is possible and even moderately easy to get mod_fcgid working with Rails and Apache2 under Debian. I''ve done it. I have it running on my own machine. } Thanks } -Georges --Greg