Posted by Graham Stratton
Tue, 08 Aug 2006 00:33:23 GMT
After discovering that the error message in my last post was apparently due to a gcc bug (in debian stable?!?), I decided to have another go. For some reason gem install fcgi worked without installing anything else new. Then I just had to change the apache config file slightly and fiddle with permissions of lots of log files, and fix a bug in typo, and now I have fcgi working again.
Posted in Rails, Debian | 1 comment
Posted by Graham Stratton
Wed, 02 Aug 2006 20:02:17 GMT
After the complexity of trying to get mod_fcgid to install last time, I’m giving up and just using cgi this time.
I tried what I did last time, but
gem install fcgi
failed with
checking for FCGX_Accept() in -lfcgi… no
I found someone who claimed to have a setup working, by compiling fcgi from fastcgi.com for themselves, but when I tried the compiler spewed this one:
multiple definition of `__i686.get_pc_thunk.bx’
I really don’t know why it’s so hard. Surely apache2 on debian must be one of the more common deployment platforms?
Posted in Rails, Debian | no comments
Posted by Graham Stratton
Wed, 02 Aug 2006 18:07:00 GMT
I’ve now completed moving most of my stuff to my new server. So far, this blog has caused me most grief. I spent ages trying to get typo to install. I kept getting the error
checking for sqlite3_open() in -lsqlite3
when trying to install the typo gem. It turned out that not only is one required to have libsqlite3 and libsqlite3-dev installed, but one mustn’t have libsqlite or libsqlite-dev installed. Apparently installing the debian package build-essential is also required.
Posted in Rails, Typo | no comments
Posted by Graham Stratton
Mon, 23 Jan 2006 10:56:00 GMT
I’ve been trying to set up Rails with fcgi using mod_fcgid and apache2 on my debian-based system.
I had a load of errors that looked like this in my Apache error log
[error] (13)Permission denied: mod_fcgid: couldn't bind unix domain socket /etc/apache2/logs/fcgidsock/1534.5
[warn] (13)Permission denied: mod_fcgid: spawn process /home/graham/public_html/blog/dispatch.fcgi error
I solved this with
sudo chmod 555 /etc/apache2/logs/
The apache log then said
[notice] mod_fcgid: server /home/graham/public_html/blog/dispatch.fcgi(1814) started
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- fcgi (MissingSourceFile)
So, I need to install ruby-fcgi. There is no debian package, but just do
sudo gem install fcgi
assuming ruby gems is installed.
Comments about
`require': no such file to load -- mkmf (LoadError)
mean that you didn’t install ruby-dev.
Death during
checking for fcgiapp.h... no
means libfcgi isn’t installed:
sudo apt-get install libfcgi
sudo apt-get install libfcgi-dev
sudo apt-get install libfcgi-ruby
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__': no such file to load -- rdoc/rdoc (LoadError)
means that I never got round to installing rdoc:
sudo apt-get install rdoc
Now everything installs! However, there’s still an error at runtime about not being able to write to fcgi.crash.log So I set the log in dispatch.fcgi to something writeable, but it doesn’t put anything useful there. Apache just returns a server error and there are segfaults in the apache log.
The remaining problem was presumably that the application couldn’t connect to the database (not sure that should result in a segfault), since starting it in production mode worked!!
Posted in Rails | no comments
Posted by Graham Stratton
Sun, 22 Jan 2006 12:52:00 GMT
Since lighttpd seems to be the recommended way of running Rails applications, but I can’t find any evidence of anyone using it to host Zope3 applications, I need another solution. mod_fastcgi is apparently buggy, so mod_fcgid is currently recommended. To install it, follow the instructions at http://paul.querna.org/journal/articles/2006/01/01/using-mod_fcgid-for-ruby-on-rails-applications
You’ll need apache2-dev, if it’s not already installed.
Posted in Rails | no comments
Posted by Graham Stratton
Tue, 17 Jan 2006 09:46:00 GMT
I need a more interesting name for my blog. Last night I thought ‘import this’ would be good. Oh well. Not only has it been done, it’s been done by someone whose primary interests are python and ruby web frameworks.
However, from that blog I did come across a small conference in the states called Snakes and Rubies, and the website has some interesting information from it.
I haven’t heard on any dedicated UK python conference, uk ruby conference, or uk rails conference. I wonder how many people would be interested if such an event happened. I’d guess there are enough enthusiasts in the UK. Anyone else out there interested?
Posted in Conferences, Rails, Ruby, Python | no comments
Posted by Graham Stratton
Mon, 16 Jan 2006 22:18:00 GMT
I have a shiny new weblog! I’m not sure that I approve of the fixed-width design, but I’ll sort that out later.
The blog is powered by Typo, which is built on the Ruby on Rails framework. It took a little bit of installing. The first problem was that irb, the interactive ruby interpreter, was not installed, but in production mode rails does not give you any hints, it just returns status 500 (internal server error) for all requests.
Running in development mode I got a traceback and fixed the problem, but then I again got status 500s with no indication of the problem. Attempting to run the test suite showed the issue: rails not being able to find mysql.sock. I would have thought that happened enough that a useful error message could be given. Anyway, a peek at my.cnf gave the required information, and adding the socket: line to database.yml fixed the problem.
After that it was merely a matter of finding the login code, concocting the correct phrase from some salt and my password, SHA1-ing it, and inserting it into the database. Maybe there was a simpler way.
Posted in Typo, Rails | no comments