Topic: RoR+Apache+MySQL+Linux error

I have RoR working with WEBrick and have followed all the steps I can find for running in Apache.

I am trying to configure my personal site to run a ruby wiki with Instiki but I thought I

Last edited by pferrel (2007-08-10 00:11:45)

Re: RoR+Apache+MySQL+Linux error

What does log/development.log say?

Some problems may be:
1. You do not have write access (0666) to your log folder AND the files inside it.
2. You may have no write permissions to sessions in tmp/sessions. Delete all files in tmp/sessions and try again.

Re: RoR+Apache+MySQL+Linux error

I should say that I am trying to get this running on Ubuntu Linux.  I have checked permissions on the base application and everything is +r+w+x.  What would make the app work in WEBrick and not in Apache even though rails is running?

Last edited by pferrel (2007-08-10 00:11:23)

Re: RoR+Apache+MySQL+Linux error

Aha, I found the logs in log/production.log and found the session permission error.  Removing all the sessions and making sure that the session directory is writable cleared up my problem.  If anyone else reads this, here is what I learned:

1.  Logs are in your-app-directory/logs one for each of the environments, production, development, test
2.  Sessions are stored in your-app-directory/tmp/sessions
2.  Switching back and forth between WEBrick and Apache requires that you clear your sessions or you will get a "stale session" error reported in the log file or you will get a permission error.
4.  The http 500 error page says, "Sorry, something went wrong."

Also I learned that it is dead simple to switch from SQLite to MySQL in Rails, it is pretty easy to switch to Apache if you are running other non-ruby apps.

Thanks to Radar, you were right on.

Re: RoR+Apache+MySQL+Linux error

Now that I'm trying to get instiki running I have more problems.  Fastcgi works with the tutorial app but not with instiki.  It seems there were some DOS paths to the ruby interpreter stored in dispatch.cgi, dispatch.fcgi, and dispatch.rb.  Fixing those didn't help.  I suspect a fastcgi problem though.