Trying to install rails/fcgi/apache2. Following these instructions: http://xmlareas.com/ruby-rails-howto.html Using Fedora Core 4. I installed ruby and ruby-devel using apt-get. Everything under Adding FastCGI (optional) works fine up to the gem install fcgi part. Here is what happens: [root@paulbarry fcgi-2.4.0]# gem install fcgi -r -- -with-fcgi-lib=/usr/local/fcgi/lib --with-fcgi-include=/usr/local/fcgi/include Attempting remote installation of ''fcgi'' Building native extensions. This could take a while... *** 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/ruby --with-fcgi-dir --without-fcgi-dir --with-fcgi-include=${fcgi-dir}/include --with-fcgi-lib --without-fcgi-lib=${fcgi-dir}/lib --with-fcgilib --without-fcgilib ERROR: While executing gem ... (RuntimeError) ERROR: Failed to build gem native extension. Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1for inspection. ruby extconf.rb install fcgi -r -- -with-fcgi-lib=/usr/local/fcgi/lib --with-fcgi-include=/usr/local/fcgi/include\nchecking for fcgiapp.h... yes checking for FCGX_Accept() in -lfcgi... no Here''s what mkmf.log has to say: [root@paulbarry fcgi-2.4.0]# cat /usr/lib/ruby/gems/1.8/gems/fcgi- 0.8.6.1/ext/mkmf.log have_header: checking for fcgiapp.h... -------------------- yes "i386-redhat-linux-gcc -E -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC conftest.c -o conftest.i" checked program was: /* begin */ #include <fcgiapp.h> /* end */ -------------------- have_library: checking for FCGX_Accept() in -lfcgi... -------------------- no "i386-redhat-linux-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC conftest.c -L"/usr/lib" -lruby-static -lfcgi -ldl -lcrypt -lm -lc" conftest.c: In function ''t'': conftest.c:4: warning: implicit declaration of function ''FCGX_Accept'' /usr/bin/ld: cannot find -lfcgi collect2: ld returned 1 exit status checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { FCGX_Accept(); return 0; } /* end */ "i386-redhat-linux-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i386-linux -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC conftest.c -L"/usr/lib" -lruby-static -lfcgi -ldl -lcrypt -lm -lc" conftest.c: In function ''t'': conftest.c:5: error: ''FCGX_Accept'' undeclared (first use in this function) conftest.c:5: error: (Each undeclared identifier is reported only once conftest.c:5: error: for each function it appears in.) checked program was: /* begin */ /*top*/ int main() { return 0; } int t() { void ((*volatile p)()); p = (void ((*)()))FCGX_Accept; return 0; } /* end */ -------------------- Help! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060114/561bb452/attachment-0001.html
Paul Barry wrote:> Trying to install rails/fcgi/apache2. Following these instructions: > > http://xmlareas.com/ruby-rails-howto.html > > Using Fedora Core 4. I installed ruby and ruby-devel using apt-get. > Everything under Adding FastCGI (optional) works fine up to the gem > install fcgi part. Here is what happens: > > [root@paulbarry fcgi-2.4.0]# gem install fcgi -r -- > -with-fcgi-lib=/usr/local/fcgi/lib > --with-fcgi-include=/usr/local/fcgi/includeLooks like you''re missing a hyphen in the with-fcgi-lib option. It should be gem install fcgi -r -- --with-fcgi-lib=/usr/local/fcgi/lib --with-fcgi-include=/usr/local/fcgi/include Phil -- Philip Ross http://tzinfo.rubyforge.org/ -- DST-aware timezone library for Ruby
Did you install the fast CGI development libraries? If so, what path are they located in? Is this path in your LD_LIBRARY_PATH, or in your /etc/ld.so.conf file? If you added the appropriate path to your ld.so.conffile, did you run ldconfig afterwards? -Will On 1/14/06, Paul Barry <mail@paulbarry.com> wrote:> > Trying to install rails/fcgi/apache2. Following these instructions: > > http://xmlareas.com/ruby-rails-howto.html > > Using Fedora Core 4. I installed ruby and ruby-devel using apt-get. > Everything under Adding FastCGI (optional) works fine up to the gem install > fcgi part. Here is what happens: > > [root@paulbarry fcgi-2.4.0]# gem install fcgi -r -- > -with-fcgi-lib=/usr/local/fcgi/lib > --with-fcgi-include=/usr/local/fcgi/include > Attempting remote installation of ''fcgi'' > Building native extensions. This could take a while... > *** 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/ruby > --with-fcgi-dir > --without-fcgi-dir > --with-fcgi-include=${fcgi-dir}/include > --with-fcgi-lib > --without-fcgi-lib=${fcgi-dir}/lib > --with-fcgilib > --without-fcgilib > ERROR: While executing gem ... (RuntimeError) > ERROR: Failed to build gem native extension. > Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fcgi- > 0.8.6.1 for inspection. > ruby extconf.rb install fcgi -r -- -with-fcgi-lib=/usr/local/fcgi/lib > --with-fcgi-include=/usr/local/fcgi/include\nchecking for fcgiapp.h... yes > checking for FCGX_Accept() in -lfcgi... no > > Here''s what mkmf.log has to say: > > [root@paulbarry fcgi-2.4.0]# cat /usr/lib/ruby/gems/1.8/gems/fcgi- > 0.8.6.1/ext/mkmf.log > have_header: checking for fcgiapp.h... -------------------- yes > > "i386-redhat-linux-gcc -E -I. -I/usr/lib/ruby/1.8/i386-linux > -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC > conftest.c -o conftest.i" > checked program was: > /* begin */ > #include <fcgiapp.h> > /* end */ > > -------------------- > > have_library: checking for FCGX_Accept() in -lfcgi... -------------------- > no > > "i386-redhat-linux-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i386-linux > -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC > conftest.c -L"/usr/lib" -lruby-static -lfcgi -ldl -lcrypt -lm > -lc" > conftest.c: In function ''t'': > conftest.c:4: warning: implicit declaration of function ''FCGX_Accept'' > /usr/bin/ld: cannot find -lfcgi > collect2: ld returned 1 exit status > checked program was: > /* begin */ > > /*top*/ > int main() { return 0; } > int t() { FCGX_Accept(); return 0; } > /* end */ > > "i386-redhat-linux-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i386-linux > -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC > conftest.c -L"/usr/lib" -lruby-static -lfcgi -ldl -lcrypt -lm > -lc" > conftest.c: In function ''t'': > conftest.c:5: error: ''FCGX_Accept'' undeclared (first use in this function) > conftest.c:5: error: (Each undeclared identifier is reported only once > conftest.c:5: error: for each function it appears in.) > checked program was: > /* begin */ > > > /*top*/ > int main() { return 0; } > int t() { void ((*volatile p)()); p = (void ((*)()))FCGX_Accept; return 0; > } > /* end */ > > -------------------- > > Help! > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060114/8bb2c367/attachment-0001.html
I started over with this method, which I had more success with: $ tar zxvf fcgi-2.4.0.tar.gz $ cd fcgi-2.4.0 $ ./configure $ make $ make install $ gem install fcgi $ wget http://www.wesmo.com/redhat/i386/mod_fastcgi-2.4.2-1.i386.rpm $ rpm -ivh mod_fastcgi-2.4.2-1.i386.rpm That got fastcgi and mo_fastcgi installed. I added this to my httpd.conf: LoadModule fastcgi_module modules/mod_fastcgi.so <IfModule mod_fastcgi.c> FastCgiIpcDir /tmp/fcgi_ipc FastCgiServer /home/paulbarry/public/dispatch.fcgi \ -initial-env RAILS_ENV=development \ -idle-timeout 60 </IfModule> And I set the set the permissions on /tmp/fcgi_ipc: $ mkdir /tmp/fcgi_ipc $ chown apache.apache /tmp/fcgi_ipc -R $ chmod 755 /tmp/fcgi_ipc -R $ ls -l /tmp drwxr-xr-x 2 apache apache 4096 Jan 14 16:19 fcgi_ipc When I start apache, I get this error: $ /etc/init.d/httpd start Starting httpd: Syntax error on line 195 of /etc/httpd/conf/httpd.conf: FastCgiIpcDir /tmp/fcgi_ipc: access for server (uid -1, gid -1) failed: write not allowed [FAILED] Any ideas as to what is causing that error? In the meantime I think it is time to give lightty a try... On 1/14/06, Will Briggs <wrbriggs@gmail.com> wrote:> > Did you install the fast CGI development libraries? If so, what path are > they located in? Is this path in your LD_LIBRARY_PATH, or in your > /etc/ld.so.conf file? If you added the appropriate path to your > ld.so.conf file, did you run ldconfig afterwards? > > -Will > > On 1/14/06, Paul Barry <mail@paulbarry.com> wrote: > > > Trying to install rails/fcgi/apache2. Following these instructions: > > > > http://xmlareas.com/ruby-rails-howto.html > > > > Using Fedora Core 4. I installed ruby and ruby-devel using apt-get. > > Everything under Adding FastCGI (optional) works fine up to the gem install > > fcgi part. Here is what happens: > > > > [root@paulbarry fcgi-2.4.0]# gem install fcgi -r -- > > -with-fcgi-lib=/usr/local/fcgi/lib > > --with-fcgi-include=/usr/local/fcgi/include > > Attempting remote installation of ''fcgi'' > > Building native extensions. This could take a while... > > *** 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/ruby > > --with-fcgi-dir > > --without-fcgi-dir > > --with-fcgi-include=${fcgi-dir}/include > > --with-fcgi-lib > > --without-fcgi-lib=${fcgi-dir}/lib > > --with-fcgilib > > --without-fcgilib > > ERROR: While executing gem ... (RuntimeError) > > ERROR: Failed to build gem native extension. > > Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/fcgi- > > 0.8.6.1 for inspection. > > ruby extconf.rb install fcgi -r -- -with-fcgi-lib=/usr/local/fcgi/lib > > --with-fcgi-include=/usr/local/fcgi/include\nchecking for fcgiapp.h... > > yes > > checking for FCGX_Accept() in -lfcgi... no > > > > Here''s what mkmf.log has to say: > > > > [root@paulbarry fcgi-2.4.0]# cat /usr/lib/ruby/gems/1.8/gems/fcgi- > > 0.8.6.1/ext/mkmf.log > > have_header: checking for fcgiapp.h... -------------------- yes > > > > "i386-redhat-linux-gcc -E -I. -I/usr/lib/ruby/1.8/i386-linux > > -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > > -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC > > conftest.c -o conftest.i" > > checked program was: > > /* begin */ > > #include <fcgiapp.h> > > /* end */ > > > > -------------------- > > > > have_library: checking for FCGX_Accept() in -lfcgi... > > -------------------- no > > > > "i386-redhat-linux-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i386-linux > > -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > > -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC > > conftest.c -L"/usr/lib" -lruby-static -lfcgi -ldl -lcrypt -lm > > -lc" > > conftest.c: In function ''t'': > > conftest.c:4: warning: implicit declaration of function ''FCGX_Accept'' > > /usr/bin/ld: cannot find -lfcgi > > collect2: ld returned 1 exit status > > checked program was: > > /* begin */ > > > > /*top*/ > > int main() { return 0; } > > int t() { FCGX_Accept(); return 0; } > > /* end */ > > > > "i386-redhat-linux-gcc -o conftest -I. -I/usr/lib/ruby/1.8/i386-linux > > -I/usr/local/fcgi/include -O0 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions > > -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -Wall -fPIC > > conftest.c -L"/usr/lib" -lruby-static -lfcgi -ldl -lcrypt -lm > > -lc" > > conftest.c: In function ''t'': > > conftest.c:5: error: ''FCGX_Accept'' undeclared (first use in this > > function) > > conftest.c:5: error: (Each undeclared identifier is reported only once > > conftest.c:5: error: for each function it appears in.) > > checked program was: > > /* begin */ > > > > > > /*top*/ > > int main() { return 0; } > > int t() { void ((*volatile p)()); p = (void ((*)()))FCGX_Accept; return > > 0; } > > /* end */ > > > > -------------------- > > > > Help! > > > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060116/2bdf769a/attachment.html
I couldn''t get the fcgi to work unless I gave /tmp/fcgi_ipc AND /tmp/fcgi_ipc/dynamic 777. Wes Paul Barry wrote: <IfModule mod_fastcgi.c>> FastCgiIpcDir /tmp/fcgi_ipc > FastCgiServer /home/paulbarry/public/dispatch.fcgi \ > -initial-env RAILS_ENV=development \ > -idle-timeout 60 > </IfModule> > > And I set the set the permissions on /tmp/fcgi_ipc: > > $ mkdir /tmp/fcgi_ipc > $ chown apache.apache /tmp/fcgi_ipc -R > $ chmod 755 /tmp/fcgi_ipc -R > $ ls -l /tmp > drwxr-xr-x 2 apache apache 4096 Jan 14 16:19 fcgi_ipc > > When I start apache, I get this error: > > $ /etc/init.d/httpd start > Starting httpd: Syntax error on line 195 of /etc/httpd/conf/httpd.conf: > FastCgiIpcDir /tmp/fcgi_ipc: access for server (uid -1, gid -1) failed: > write not allowed > [FAILED] > > Any ideas as to what is causing that error? In the meantime I think it > is > time to give lightty a try...-- Posted via http://www.ruby-forum.com/.
Paul Barry wrote:> > That got fastcgi and mo_fastcgi installed. I added this to my > httpd.conf: > > LoadModule fastcgi_module modules/mod_fastcgi.so >If you use Apache 2.x, use mod_fcgid instead of mod_fastcgi. This is noted in the rails FAQ. http://wiki.rubyonrails.com/rails/pages/FAQ -- Posted via http://www.ruby-forum.com/.
Paul Barry wrote:> I started over with this method, which I had more success with: > > $ tar zxvf fcgi-2.4.0.tar.gz > $ cd fcgi-2.4.0 > $ ./configure > $ make > $ make install > $ gem install fcgi > $ wget http://www.wesmo.com/redhat/i386/mod_fastcgi-2.4.2-1.i386.rpm > $ rpm -ivh mod_fastcgi-2.4.2-1.i386.rpm > > That got fastcgi and mo_fastcgi installed. I added this to my > httpd.conf: > > LoadModule fastcgi_module modules/mod_fastcgi.so > > <IfModule mod_fastcgi.c> > FastCgiIpcDir /tmp/fcgi_ipc > FastCgiServer /home/paulbarry/public/dispatch.fcgi \ > -initial-env RAILS_ENV=development \ > -idle-timeout 60 > </IfModule> > > And I set the set the permissions on /tmp/fcgi_ipc: > > $ mkdir /tmp/fcgi_ipc > $ chown apache.apache /tmp/fcgi_ipc -R > $ chmod 755 /tmp/fcgi_ipc -R > $ ls -l /tmp > drwxr-xr-x 2 apache apache 4096 Jan 14 16:19 fcgi_ipc > > When I start apache, I get this error: > > $ /etc/init.d/httpd start > Starting httpd: Syntax error on line 195 of /etc/httpd/conf/httpd.conf: > FastCgiIpcDir /tmp/fcgi_ipc: access for server (uid -1, gid -1) failed: > write not allowed > [FAILED] > > Any ideas as to what is causing that error? In the meantime I think it > is > time to give lightty a try...Hi, the problem is that apache server isn''t allowed to read that directory this is not user and group this is how your apache configure in httpd.conf you need to add something like <Directory /tmp/fcgi_ipc> Allow from all </Directory> -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---