Archive for September, 2008

http and https with different urls in rails

I wanted to do the following on my site: http://www.cadechristian.com and https://secure.cadechristian.com I ran in to the problem that the cookie was not valid on BOTH domains and I search for the longest time before I found this solution. What I found was to put this in the environmnet.rb file: (I’m on rails 2.1) config.action_controller.session [...]

Continue reading »

Building a site map in Ruby on Rails…

I needed an automated sitemap process for the www.cadechristian.com website and here is what I managed to create…route.rb: map.sitemap ‘sitemap.xml’, :controller => ‘sitemap’, :action => ‘sitemap’ robots.txt: Sitemap: http://www.cadechristian.com/sitemap.xml sitemap controller: def sitemap @model1 = Page.find(:all) @model2 = Page.find(:all)render :layout => falseend /app/view/sitemap/sitemap.builder: @home_url = ‘http://www.cadechristian.com’ xml.instruct!xml.urlset mlns => ‘http://www.sitemaps.org/schemas/sitemap/0.9′ do # Add static Urls [...]

Continue reading »

mod_mem_cache.c:591: undefined reference to `ap_cache_cacheable_hdrs_out’

If you are getting this error, it’s because you’ve included the ‘–enable-mem-cache‘ flag, but not the ‘–enable-cache‘ one. You need both. enable-disk-cache also needs the same enable-cache switch to work.

Continue reading »

Follow

Get every new post delivered to your Inbox.