SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can't quite get Rails to work, help!

    I've followed the install the install guide on http://hivelogic.com/articles/2005/1...pd_mysql_tiger and it seemed to work. And I've been following the Instant Gratifiction guide in Chapter four in Agile Web Development with Rails book. I'm in terminal and I type -

    cd work (everything works fine) then
    rails demo (everything seems to work) then
    cd demo (all goes well) then
    ls -p (nothing wrong) then
    ruby script/server - and i get this error -

    ruby: Is a directory - script (Errno::EISDIR)
    william-mors-powerbook-g4-15:~/work/demo cooper$ ruby script/server
    => Booting lighttpd (use 'script/server webrick' to force WEBrick)
    => Rails application started on http://0.0.0.0:3000
    => Call with -d to detach (requires absolute paths in config/lighttpd.conf)
    => Ctrl-C to shutdown server (see config/lighttpd.conf for options)
    2006-03-24 21:50:10: (mod_fastcgi.c.1022) execve failed for: public/dispatch.fcgi No such file or directory
    2006-03-24 21:50:10: (mod_fastcgi.c.1048) the fastcgi-backend public/dispatch.fcgi failed to start:
    2006-03-24 21:50:10: (mod_fastcgi.c.1052) child exited with status 2 public/dispatch.fcgi
    2006-03-24 21:50:10: (mod_fastcgi.c.1055) if you try do run PHP as FastCGI backend make sure you use the FastCGI enabled version.
    You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT (cgi) NOR (cli)
    For more information check http://www.lighttpd.net/documentatio...astcgi-program
    2006-03-24 21:50:10: (mod_fastcgi.c.1060) If this is PHP on Gentoo add fastcgi to the USE flags
    2006-03-24 21:50:10: (mod_fastcgi.c.1356) [ERROR]: spawning fcgi failed.
    2006-03-24 21:50:10: (server.c.834) Configuration of plugins failed. Going down.

    Does anyone have any insight? Should I just retry the FastCGI install part? Thanks !
    Last edited by c-c-C-C-UNIT; Mar 24, 2006 at 21:07.

  2. #2
    SitePoint Guru Majglow's Avatar
    Join Date
    Aug 1999
    Location
    B-Town
    Posts
    645
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have lighttpd installed and configured wrong.

    The easiest thing to do for working through the book is starting webrick as follows:

    ruby script/server webrick
    Ohai!

  3. #3
    SitePoint Zealot
    Join Date
    Sep 2005
    Posts
    177
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Had exactly the same problem yesterday.

    Solved it by using lighttpd-1.4.8 instead of the suggested lighttpd-1.4.11

    There is a very brief snippet here as to why the problem may occur and a fix that has to be applied to your lighttpd.conf if you want to use lighttpd-1.4.9 or above.

  4. #4
    SitePoint Guru silver trophy Luke Redpath's Avatar
    Join Date
    Mar 2003
    Location
    London
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, not had any problems using lighty 1.4.11 on OSX myself. I installed everything using the hivelogic guide.

    Try running it as './script/server' instead of 'ruby script/server'

  5. #5
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Posts
    90
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Majglow
    You have lighttpd installed and configured wrong.

    The easiest thing to do for working through the book is starting webrick as follows:

    ruby script/server webrick
    That worked, thanks! is there anything wrong with doing like that as opposed to just 'ruby script/server' and how could I configure lighttpd to function correctly. Thanks again!
    Last edited by c-c-C-C-UNIT; Mar 25, 2006 at 14:36.

  6. #6
    SitePoint Guru Majglow's Avatar
    Join Date
    Aug 1999
    Location
    B-Town
    Posts
    645
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually, I don't think it's a question of "wrong version," but the new version of lighthttpd requires a the full path to dispatch.fcgi which you set in the config.

    webrick works fine for developing as far as I know.. but I'm still new to all this.
    Ohai!

  7. #7
    SitePoint Evangelist
    Join Date
    Jun 2004
    Location
    California
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Funny, I just had this problem today. It is quite annoying but if you change the rails default lighttpd.conf to be the fix posted above, it is fine You just need to add CWD + "/ in front of the bin-path.
    Happy switcher to OS X running on a MacBook Pro.

    Zend Certified Engineer


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •