I'm having a heck of a time getting a site I modified to work correctly. I didn't set the site up originally, and since the person that set it up no longer works with me I had to learn ruby just to make some changes. I made all the changes in the development server and everything worked fine. Then I did a diff on the production and development and moved only my changes over. Unfortunately when I loaded my changes onto the production server I got a lot of errors.
I've changed all of the permissions to 755, which took care being able to access anything at all, but after that I started getting a lot of 500 errors. Nothing showed up in the production.log file. I really have no clue what's going wrong except that perhaps things are not noticing the new changes. I moved the old site to a backup folder, and th开发者_StackOverflow社区e new site crashes whenever it goes to anything that I've changed. In particular, I added a link to a new setup with an extra controller/model/view group. It works fine on development but in production it gives me a 404. Yes, I did copy all the files up.
I even put everything back how it was, but the website is still showing the broken version of it. I checked the tmp/cache folder but it was empty. Running dispatch.fcgi shows the old site (which I expected) but it still shows the flawed new site when I connect through a browser.
I've been tearing my hair out trying to get this to work. Any ideas as to how I can get this to work?
Just an idea, have you restarted the production server after making those changes?
In ubuntu or any linux version the command is:
sudo /etc/init.d/apache restart
From your description, seems like the server has not taken the new changes.
Hopefully this helps.
Under FastCGI deployment, a cgi "dispatcher" process is started. Apache communicates with this (these) process(es), which are actually responsible for passing requests to/from the Rails app. This way several copies of the app are kept running, and the Apache processes just communicate with these, saving the startup/teardown time associated with non-accelerated CGI requests.
Since it's running in production mode, there's a lot of caching going on, which might explain why you're still seing the old version of the site. When you're in development mode, it explicitly doesn't cache things, so you can see your changes immediately.
I'd try restarting the web server as suggested, this should restart the FastCGI handler as well.
Also, be aware that Rails deployment is somewhat complicated; I'd advise you to read up on it. Also you might want to fiddle with your permissions to make sure the logs are being written to; they contain useful debugging information.
精彩评论