My time with CodeIgniter was fun, but it’s time to switch back to Rails. I enjoyed the ability to really get in and handle some of the code the way that I preferred, but overall I found that I missed a lot of the automagical things that happen with Rails. The biggest shortcoming for me was the lack of a real ActiveRecord model. I might give it a shot where it seems appropriate in the future, but for now I’m going back to Rails.

I received the error “The change you wanted was rejected” after I moved a rails app from one host to another.
Looking into the log file, the following error appears:
ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken):
/usr/lib/ruby/1.8/mongrel/rails.rb:76:in `process'
/usr/lib/ruby/1.8/mongrel/rails.rb:74:in `synchronize'
/usr/lib/ruby/1.8/mongrel/rails.rb:74:in `process'
/usr/lib/ruby/1.8/mongrel.rb:159:in `process_client'
/usr/lib/ruby/1.8/mongrel.rb:158:in `each'
/usr/lib/ruby/1.8/mongrel.rb:158:in `process_client'
/usr/lib/ruby/1.8/mongrel.rb:285:in `run'
/usr/lib/ruby/1.8/mongrel.rb:285:in `initialize'
/usr/lib/ruby/1.8/mongrel.rb:285:in `new'
/usr/lib/ruby/1.8/mongrel.rb:285:in `run'
/usr/lib/ruby/1.8/mongrel.rb:268:in `initialize'
/usr/lib/ruby/1.8/mongrel.rb:268:in `new'
/usr/lib/ruby/1.8/mongrel.rb:268:in `run'
/usr/lib/ruby/1.8/mongrel/configurator.rb:282:in `run'
/usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `each'
/usr/lib/ruby/1.8/mongrel/configurator.rb:281:in `run'
/usr/lib/ruby/1.8/mongrel/command.rb:212:in `run'
Rendering /vol/sites/site/public/422.html (422 Unprocessable Entity)
Some further investigation revealed that there was an issue with how rails 2.3.8 was handling cookies. I stumbled upon the following fix at https://rails.lighthouseapp.com/projects/8994/tickets/4690.
I used Ken Collins’ fix of adding his mongrel.rb (http://gist.github.com/471663) to config/initializers and now all is well.

I have been moving applications from my Rackspace host over to Amazon’s EC2 service. Moving simple LAMP apps has been fairly cut and dry, but while moving a RoR app and accessing it through apache w/ mod_proxy, the html is delivered to the browser as plaintext. If I access the app directly on mongrel’s port, it renders correctly. So it appears that something with either my mod_proxy configuration, or something about how my EC2 instance is set up is causing the problem.
> curl -I http://linux.local:3000
HTTP/1.1 200 OK
Connection: close
Date: Thu, 15 Jul 2010 14:27:27 GMT
Content-Length: 0
> curl -I http://linux.local
HTTP/1.1 200 OK
Date: Thu, 15 Jul 2010 14:27:35 GMT
Via: 1.1 linux.local
Content-Type: text/plain
As you can see, when accessing the page through Apache/mod_proxy, the Content-Type that is returned is explicitly set as text/plain.
Update
This is a bit shoe-horned, but it works for right now. In the apache2.conf file, I changed the DefaultType from text/plain to text/html. The reason this solution “concerns” me is that on my other servers, (where this problem is not occurring) the DefaultType is also set to text/plain, but the html is output correctly.

From time to time you may need to flush the dns cache on your mac. I had recently moved a site from one host to another, and while the nameservers at the various levels returned the new IP address, my browser still looked to the old IP address.
To resolve issues like this, (in Leopard) open a terminal and type in
> dscacheutil -flushcache
The same issue is resolved in 10.5.1 and earlier, open a terminal and type
> lookupd -flushcache