Question

First RoR app with Apache and MySQL Error with fcgid

Asked by: OutOfTouch

Please Note I already had apache2 and MySQL installed before installing ruby and RoR with the instructions listed in the two links below.

I installed ruby 1.8.7 with apt-get and gems I installed 1.3.2 from source and that all appears to work fine. I also updated gems before installing RoR.

This is my first attempt at installing and creating a new application using RoR with Apache and MySQL on a local LinuxMint install. So being MS guy all this is new to me.

I followed these instructions here:
http://howtoforge.com/ruby_on_rails_debian_etch
in combo with these
http://forums.linuxmint.com/viewtopic.php?f=42&t=20868&p=192826#p192826

I see the following error when clicking on the default RoR page
About your applications environment link:

The Error:

Not Found

The requested URL /dispatch.fcgi was not found on this server.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2009-09-25 at 00:21:20ID24760983
Topics

RubyOnRails

,

Apache Web Server

Participating Experts
1
Points
500
Comments
36

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Installing Ruby on Rails on FreeBSD with Apache, MySql
    Hi, I wanted to get a production quality install help for latest Ruby on Rails, Apache or lighthttpd and mysql. Can you help me out with that? Thanks
  2. Install Apache, MySQL and Ruby on Rail on my machine
    I would like to install on my machine Apache, Ruby on rails and Mysql. Can someone give me a walktrough for this? Thank you
  3. Configuring Apache For Ruby On Rails
    I have an installation of LAMP through XAMPP; i.e. I have PHP, MySql, Apache configured. I also downloaded Ruby and installed Rails through Ruby Gems command line. What do I do next? How do I create a Rails app and how to configure Apache to render the same?
  4. Configuring Ruby on Rails with Apache on FreeBDS
    Hi, I have troubles to configure Ruby On Rail with Apache on FreeBSD. I've already tried everithing I was able to google up. Everything in vain. Thanks
  5. I want to developed a ruby on rails using netbeans IDE and …
    Hello, I have Netbeans 6.0 installed, Lamp (apache, mysql, and php). I want to develop a web application based on ruby on rails using apache. How do I configure apache to run the application? I also need the same configuration just to run other web applications not based on ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: doadesPosted on 2009-09-25 at 01:07:24ID: 25420864

That file used to be stored under the public directory in the rails project folder...

I copied mine and pasted it below, if you want to copy it into dispatch.fcgi

Andrew

#!c:/ruby/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!
                                              
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:

Select allOpen in new window

 

by: doadesPosted on 2009-09-25 at 02:05:17ID: 25421181

also just to make sure install the gem...

gem install fcgi

 

by: OutOfTouchPosted on 2009-09-25 at 03:19:12ID: 25421505

Ok I tried running gem install fcgi but got a build error:


Building native extensions.  This could take a while...
ERROR:  Error installing fcgi:
   ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for fcgiapp.h... no
checking for fastcgi/fcgiapp.h... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
   --with-opt-dir
   --without-opt-dir
   --with-opt-include
   --without-opt-include=${opt-dir}/include
   --with-opt-lib
   --without-opt-lib=${opt-dir}/lib
   --with-make-prog
   --without-make-prog
   --srcdir=.
   --curdir
   --ruby=/usr/bin/ruby1.8
   --with-fcgi-dir
   --without-fcgi-dir
   --with-fcgi-include
   --without-fcgi-include=${fcgi-dir}/include
   --with-fcgi-lib
   --without-fcgi-lib=${fcgi-dir}/lib


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/ext/fcgi/gem_make.out


 

by: doadesPosted on 2009-09-25 at 03:38:35ID: 25421577

I think I've seen this error before when you don't have make installed.

you might need to install make and try again.

Andrew

 

by: OutOfTouchPosted on 2009-09-25 at 03:51:32ID: 25421648

How do I do  install make?

 

by: doadesPosted on 2009-09-25 at 03:52:06ID: 25421652

what operating system are you using?

 

by: OutOfTouchPosted on 2009-09-25 at 03:56:03ID: 25421689

Actually I checked in the termian I typed make -help and it appears to be installed.

 

by: OutOfTouchPosted on 2009-09-25 at 03:57:02ID: 25421697

I am using Linux Mint 7 Gloria main

 

by: OutOfTouchPosted on 2009-09-25 at 03:57:55ID: 25421704

I meant to say terminal above I hate that you can't edit typos here.

 

by: doadesPosted on 2009-09-25 at 04:02:14ID: 25421726

with Linux Mint you can do..

apt-get install make automake

These are the usual things that cause gem install problems.

 

by: OutOfTouchPosted on 2009-09-25 at 04:11:04ID: 25421782

Make was already installed, I installed automake but I still get the same error with gem install fcgi.

Unreal how difficult this is, a week and still not coding I would have IIS, SQL Server and Visual Studio installed and writing code by now with updates completed to all 3.

Here is the mkvf.log

have_header: checking for fcgiapp.h... -------------------- no

"cc -E -I. -I/usr/lib/ruby/1.8/i486-linux -I.  -D_FILE_OFFSET_BITS=64  -fno-strict-aliasing -g -g -O2  -fPIC    conftest.c -o conftest.i"
conftest.c:1:21: error: fcgiapp.h: No such file or directory
checked program was:
/* begin */
1: #include <fcgiapp.h>
/* end */

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

have_header: checking for fastcgi/fcgiapp.h... -------------------- no

"cc -E -I. -I/usr/lib/ruby/1.8/i486-linux -I.  -D_FILE_OFFSET_BITS=64  -fno-strict-aliasing -g -g -O2  -fPIC    conftest.c -o conftest.i"
conftest.c:1:29: error: fastcgi/fcgiapp.h: No such file or directory
checked program was:
/* begin */
1: #include <fastcgi/fcgiapp.h>
/* end */

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



 

by: OutOfTouchPosted on 2009-09-25 at 04:22:52ID: 25421879

I meant mkmf.log.

 

by: doadesPosted on 2009-09-25 at 04:37:05ID: 25421957

OK try this, I've just run this on my ubuntu server and all works
Ubuntu and Linux Mint are basically the same....

sudo apt-get install libfcgi-dev
sudo gem install fcgi

Andrew

 

by: OutOfTouchPosted on 2009-09-25 at 04:44:55ID: 25422003

That worked! Now how to fix the error with the link on the default rails index page

 

by: doadesPosted on 2009-09-25 at 04:47:12ID: 25422015

As I said in my first post, you should be able to create a file called dispatch.fcgi
in the public folder in the rails application and copt the code I posted into that file.

Andrew

 

by: OutOfTouchPosted on 2009-09-25 at 04:51:40ID: 25422045

ok I created that file under the public folder here /var/rails/myrailsapp/public/dispatch.fcgi
I restarted apache and reload this app in  FF, now when I click on the link nothing happens?

 

by: OutOfTouchPosted on 2009-09-25 at 04:52:56ID: 25422057

Crap, I didn't wait long enough I see this:

Service Temporarily Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.  Apache/2.2.11 (Ubuntu) PHP/5.2.6-3ubuntu4.2 with Suhosin-Patch mod_ssl/2.2.11 OpenSSL/0.9.8g Server at ruby.blaze.local Port 80

 

by: OutOfTouchPosted on 2009-09-25 at 04:55:19ID: 25422066

Is this accessing an external  web service or something?

 

by: doadesPosted on 2009-09-25 at 04:56:23ID: 25422072

Not that I'm aware of, I think all the file does is handle any CGI for the site.

 

by: OutOfTouchPosted on 2009-09-25 at 05:05:42ID: 25422128

I don't understand no error message now it just says that unavailable.

 

by: OutOfTouchPosted on 2009-09-25 at 05:26:45ID: 25422258

Apache Error.log

Fri Sep 25 06:49:00 2009] [emerg] mod_fcgid: server is restarted, 10723 must exit
[Fri Sep 25 06:49:45 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 06:50:02 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 06:50:48 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 06:54:10 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 07:03:42 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 07:11:55 2009] [warn] (104)Connection reset by peer: mod_fcgid: read data from fastcgi server error.
[Fri Sep 25 07:11:55 2009] [error] [client 127.0.0.1] Premature end of script headers: dispatch.fcgi, referer: http://ruby.blaze.local/
[Fri Sep 25 07:12:57 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 07:12:59 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 07:19:58 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi
[Fri Sep 25 07:23:15 2009] [warn] mod_fcgid: can't apply process slot for /var/rails/myrailsapp/public/dispatch.fcgi

 

by: OutOfTouchPosted on 2009-09-26 at 01:05:34ID: 25429152

I am trying some of these leads but I am not having much success:

http://www.ruby-forum.com/topic/5768

http://www.megalinux.net/mod_fcgid-cant-apply-process-slot/

but I think this is the right path.

 

by: OutOfTouchPosted on 2009-09-26 at 01:20:31ID: 25429179

mod_fcgid: process /var/rails/myrailsapp/public/dispatch.fcgi(8126) exit(server exited), terminated by calling exit(), return code: 255

 

by: OutOfTouchPosted on 2009-09-26 at 01:25:27ID: 25429196

In your dispatch.fcgi file I changed the first line to this:
#!/usr/bin/ruby

Now I see Were sorry something went wrong,
I will check to see what error it is now.

 

by: OutOfTouchPosted on 2009-09-26 at 01:27:55ID: 25429202

Couldn't write to "/var/rails/myrailsapp/log/fastcgi.crash.log": starting
 Errno::EACCES: Permission denied - /var/rails/myrailsapp/log/fastcgi.crash.log

 

by: doadesPosted on 2009-09-26 at 03:06:29ID: 25429367

OK, try running this command on the server:

chmod -R 755 /var/rails/myrailsapp

This should give you read & write permissions to the folder.

I've had to do this a few times when setting up a rails app in production.

 

by: OutOfTouchPosted on 2009-09-26 at 13:22:04ID: 25431373

Still getting Errors:

Rails Error: Unable to access log file. Please ensure that /var/rails/myrailsapp/log/development.log exists and is chmod 0666. The log level has been raised to WARN and the output directed to STDERR until the problem is fixed.
Couldn't write to "/var/rails/myrailsapp/log/fastcgi.crash.log": starting
 Errno::EACCES: Permission denied - /var/rails/myrailsapp/log/fastcgi.crash.log
/!\ FAILSAFE /!\  Sat Sep 26 15:11:22 -0500 2009
 Status: 500 Internal Server Error
 Unknown database 'myrailsapp_development'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:585:in `real_connect'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:585:in `connect'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:199:in `initialize'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:71:in `new'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/mysql_adapter.rb:71:in `mysql_connection'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `send'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:223:in `new_connection'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:245:in `checkout_new_connection'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:188:in `checkout'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `loop'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:184:in `checkout'
   /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:183:in `checkout'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:98:in `connection'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:326:in `retrieve_connection'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:123:in `retrieve_connection'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_specification.rb:115:in `connection'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:9:in `cache'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/query_cache.rb:28:in `call'
   /usr/lib/ruby/gems/1.8/gems/activerecord-2.3.4/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
   /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/head.rb:9:in `call'
   /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:24:in `call'
   /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/params_parser.rb:15:in `call'
   /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:93:in `call'
   /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/failsafe.rb:26:in `call'
   /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
   /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `synchronize'
   /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/lock.rb:11:in `call'
   /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:114:in `call'
   /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/reloader.rb:34:in `run'
   /usr/lib/ruby/gems/1.8/gems/actionpack-2.3.4/lib/action_controller/dispatcher.rb:108:in `call'
   /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:13:in `call'
   /usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/handler/fastcgi.rb:56:in `serve'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:103:in `process_request'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:153:in `with_signal_handler'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:101:in `process_request'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:78:in `process_each_request'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:77:in `each'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:77:in `process_each_request'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:76:in `catch'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:76:in `process_each_request'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:51:in `process!'
   /usr/lib/ruby/gems/1.8/gems/rails-2.3.4/lib/fcgi_handler.rb:23:in `process!'
   /var/rails/myrailsapp/public/dispatch.fcgi:24

 

by: doadesPosted on 2009-09-26 at 14:20:22ID: 25431596

OK, the first problem will be this:

"Unknown database 'myrailsapp_development'"

You need to make sure your database.yml is setup correctly.

Also for the log errors, although it sounds silly, have you got log/development.log with the right chmod 0666?

Andrew

 

by: OutOfTouchPosted on 2009-09-26 at 14:56:55ID: 25431716

I did run the chmod 0666 on the development.log
chmod 0666 /var/rails/myrailsapp/log/development.log

I changed my database.yml before all of this to reflect this.
I wonder if it can't find the socket?
development:
 adapter: mysql
 encoding: utf8
 reconnect: false
 database: myrailsapp_development
 pool: 5
 username: root
 password: myPassowrdIsHere
 socket: /var/run/mysqld/mysqld.sock



 

by: doadesPosted on 2009-09-26 at 14:58:54ID: 25431723

I never actually use "socket" I always use "host:"
like
host: localhost

 

by: OutOfTouchPosted on 2009-09-27 at 00:06:34ID: 25433007

That socked file exits i checked, I don't think that is the problem, I think the fcgi problem is fixed but I think it needs to be able to connect and find a database called myrailsapp_development

Do I need to run the rake command to create this db first?


 

by: OutOfTouchPosted on 2009-09-27 at 01:12:19ID: 25433120

ok I created a test db and than clcked that link and it works now!

Thanks!

I am going to create another test rails app and see if the dispatch.fcgi file is automatically created because it should get created automatically once everything is installed correctly right?

I checked for that file in myrailsapp and I never had it I had to use yours and create one and modify the bash command the first line in the file., plus all the other stuff we did.

 

by: doadesPosted on 2009-09-27 at 02:44:50ID: 25433341

You need to run "rake db:migrate" after you have created and setup some database migrations and you have a database there.

I don't think there is a rake command to actually create the db for you.

I have a feeling that it isn't created automatically anymore, that file I sent you want from a project that is a about a years old and has moved through all the different rails versions.

Might be something worth looking into, to find out what it does and why its needed ( I don't have it in a fresh project I just created)

Andrew

 

by: OutOfTouchPosted on 2009-09-27 at 16:28:02ID: 25435918

Does this command create an empty db?
rake db:create


 

by: OutOfTouchPosted on 2009-09-28 at 00:07:04ID: 25437208

I have another question that I will open if you know the answer so you can get some more points. Do you know how to view the rdocs on apache locally? In other words how to create the documentation locally once so I can always view it locally instead of online.

 

by: OutOfTouchPosted on 2009-09-28 at 00:08:26ID: 31633419

All of the things suggested led to the solution.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...