# Upgrading from 0.6.x to 0.8.0: pages show css + admin error

**URL:** <https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215>\
**Category:** Radiant CMS\
**Created:** [June 29, 2009, 12:37am UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215 "2009-06-29T00:37:23Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [June 29, 2009, 12:37am UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/1 "2009-06-29T00:37:23Z")

</div>

I’ve just updated my Radiant installation on a shared server  
(RailsPlayground) from a 0.6.x version to 0.8.0.  
www.milleunacoda.it

Update and migration ended correctly (not a bootstrap) but the result  
is:

- pages are not loaded at first time, they show the css file. Forcing  
browser to recharge them they load correctly.
- admin page don’t works. After login I receive the “Application error  
(Apache)” page. Log says:

Processing Admin::WelcomeController#login (for 80.174.197.81 at  
2009-06-28 15:54:47) [GET]  
Parameters: {“action”=\>“login”, “controller”=\>“admin/welcome”}  
Rendering template within layouts/application  
Rendering admin/welcome/login  
Completed in 9ms (View: 6, DB: 1) | 200 OK  
[[http://www.milleunacoda.it/admin/login](http://www.milleunacoda.it/admin/login)]  
/!\ FAILSAFE /!\ Sun Jun 28 15:54:55 -0500 2009  
Status: 500 Internal Server Error  
wrong number of arguments (1 for 2)  
/home/seuck/radiant/vendor/radiant/vendor/rack-cache/lib/rack/cache/metastore.rb:94:in  
`restore_response' /home/seuck/radiant/vendor/radiant/vendor/rack-cache/lib/rack/cache/metastore.rb:94:in `invalidate’  
/home/seuck/radiant/vendor/radiant/vendor/rack-cache/lib/rack/cache/metastore.rb:93:in  
`map' /home/seuck/radiant/vendor/radiant/vendor/rack-cache/lib/rack/cache/metastore.rb:93:in `invalidate’  
/home/seuck/radiant/vendor/radiant/vendor/rack-cache/lib/rack/cache/context.rb:137:in  
`invalidate' /home/seuck/radiant/vendor/radiant/vendor/rack-cache/lib/rack/cache/context.rb:69:in `call!’  
/home/seuck/radiant/vendor/radiant/vendor/rack-cache/lib/rack/cache/context.rb:50:in  
`call’

Any clue?

Thanks a lot  
Antonio

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [August 1, 2009, 3:44am UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/2 "2009-08-01T03:44:35Z")

</div>

Lorand Bruhacs wrote:

> Toni Bianchetti wrote:
> 
> > I’ve just updated my Radiant installation on a shared server  
> > (RailsPlayground) from a 0.6.x version to 0.8.0.  
> > www.milleunacoda.it
> > 
> > Update and migration ended correctly (not a bootstrap) but the result  
> > is:
> > 
> > - pages are not loaded at first time, they show the css file. Forcing  
> > browser to recharge them they load correctly.
> > - admin page don’t works. After login I receive the “Application error  
> > (Apache)” page. Log says:
> 
> I am experiencing the exact same issue with a fresh 0.8.0 install on  
> shared hosting. Looks to be some incompatibility of Rack::Cache and the  
> FastCGI execution enviroment.

yes im having the same problem. although it kinda work when i refresh  
the page.

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [June 30, 2009, 10:49pm UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/3 "2009-06-30T22:49:03Z")

</div>

Toni Bianchetti wrote:

> I’ve just updated my Radiant installation on a shared server  
> (RailsPlayground) from a 0.6.x version to 0.8.0.  
> www.milleunacoda.it
> 
> Update and migration ended correctly (not a bootstrap) but the result  
> is:
> 
> - pages are not loaded at first time, they show the css file. Forcing  
> browser to recharge them they load correctly.
> - admin page don’t works. After login I receive the “Application error  
> (Apache)” page. Log says:

I am experiencing the exact same issue with a fresh 0.8.0 install on  
shared hosting. Looks to be some incompatibility of Rack::Cache and the  
FastCGI execution enviroment.

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [August 17, 2009, 7:38pm UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/4 "2009-08-17T19:38:05Z")

</div>

Here is a workaround. This works.

[http://lists.radiantcms.org/pipermail/radiant/2009-July/013426.html](http://lists.radiantcms.org/pipermail/radiant/2009-July/013426.html)

Geordee Naliyath wrote:

> Anyone solved this? I am getting problem in a shared hosting  
> environment.
> 
> Cpx Cpx wrote:
> 
> > Lorand Bruhacs wrote:
> > 
> > > Toni Bianchetti wrote:
> > > 
> > > > I’ve just updated my Radiant installation on a shared server  
> > > > (RailsPlayground) from a 0.6.x version to 0.8.0.  
> > > > www.milleunacoda.it
> > > > 
> > > > Update and migration ended correctly (not a bootstrap) but the result  
> > > > is:
> > > > 
> > > > - pages are not loaded at first time, they show the css file. Forcing  
> > > > browser to recharge them they load correctly.
> > > > - admin page don’t works. After login I receive the “Application error  
> > > > (Apache)” page. Log says:
> > > 
> > > I am experiencing the exact same issue with a fresh 0.8.0 install on  
> > > shared hosting. Looks to be some incompatibility of Rack::Cache and the  
> > > FastCGI execution enviroment.
> > 
> > yes im having the same problem. although it kinda work when i refresh  
> > the page.

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [August 17, 2009, 10:14pm UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/5 "2009-08-17T22:14:14Z")

</div>

Thanks a lot. It’s the fist real help of this post.

Btw, I’ve tryed to apply the same change in  
/lib/radiant/cache.rb  
described in the linked post, restart the server but nothing have  
changed.

My modified production file is located in:  
/home/seuck/radiant/vendor/

The last post of the linked discussion regarding “mailer.post\_to\_page? =  
true” is quite obscure.

Please, can someone explaing exactly what to do?

Cheers  
Toni

Geordee Naliyath wrote:

> Here is a workaround. This works.
> 
> [http://lists.radiantcms.org/pipermail/radiant/2009-July/013426.html](http://lists.radiantcms.org/pipermail/radiant/2009-July/013426.html)

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [August 18, 2009, 6:06am UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/6 "2009-08-18T06:06:02Z")

</div>

Here is the diff. Change the 48th line in cache.rb. It worked for me in  
Site5.

diff --git a/lib/radiant/cache.rb b/lib/radiant/cache.rb  
index a825555..2e16de9 100644  
— a/lib/radiant/cache.rb  
+++ b/lib/radiant/cache.rb  
@@ -48,7 +48,7 @@ module Radiant  
end  
private

- 

```
 def restore_response(hash, body)

```

- 

```
 def restore_response(hash, body=nil)
  # Cribbed from the Rack::Cache source
  status = hash.delete('X-Status').to_i
  response = Rack::Cache::Response.new(status, hash, body)

```

Toni Bianchetti wrote:

> Thanks a lot. It’s the fist real help of this post.
> 
> Btw, I’ve tryed to apply the same change in  
> /lib/radiant/cache.rb  
> described in the linked post, restart the server but nothing have  
> changed.
> 
> My modified production file is located in:  
> /home/seuck/radiant/vendor/
> 
> The last post of the linked discussion regarding “mailer.post\_to\_page? =  
> true” is quite obscure.
> 
> Please, can someone explaing exactly what to do?
> 
> Cheers  
> Toni
> 
> Geordee Naliyath wrote:
> 
> > Here is a workaround. This works.
> > 
> > [http://lists.radiantcms.org/pipermail/radiant/2009-July/013426.html](http://lists.radiantcms.org/pipermail/radiant/2009-July/013426.html)

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [August 17, 2009, 7:33pm UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/7 "2009-08-17T19:33:56Z")

</div>

Anyone solved this? I am getting problem in a shared hosting  
environment.

Cpx Cpx wrote:

> Lorand Bruhacs wrote:
> 
> > Toni Bianchetti wrote:
> > 
> > > I’ve just updated my Radiant installation on a shared server  
> > > (RailsPlayground) from a 0.6.x version to 0.8.0.  
> > > www.milleunacoda.it
> > > 
> > > Update and migration ended correctly (not a bootstrap) but the result  
> > > is:
> > > 
> > > - pages are not loaded at first time, they show the css file. Forcing  
> > > browser to recharge them they load correctly.
> > > - admin page don’t works. After login I receive the “Application error  
> > > (Apache)” page. Log says:
> > 
> > I am experiencing the exact same issue with a fresh 0.8.0 install on  
> > shared hosting. Looks to be some incompatibility of Rack::Cache and the  
> > FastCGI execution enviroment.
> 
> yes im having the same problem. although it kinda work when i refresh  
> the page.

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [November 29, 2009, 1:46am UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/8 "2009-11-29T01:46:53Z")

</div>

As a temporary solution, simply disabling page cache it works again:  
In “config/environment.rb”, comments “config.middleware.use  
::Radiant::Cache”

---

<div class="post-metadata">

**Author:** ![seuck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b782af/32.png) [@seuck](https://www.ruby-forum.com/u/seuck)\
**Post date:** [September 20, 2009, 11:42pm UTC](https://www.ruby-forum.com/t/upgrading-from-0-6-x-to-0-8-0-pages-show-css-admin-error/171215/9 "2009-09-20T23:42:30Z")

</div>

Geordee Naliyath wrote:

> Here is the diff. Change the 48th line in cache.rb. It worked for me in  
> Site5.
> 
> diff --git a/lib/radiant/cache.rb b/lib/radiant/cache.rb  
> index a825555..2e16de9 100644  
> — a/lib/radiant/cache.rb  
> +++ b/lib/radiant/cache.rb  
> @@ -48,7 +48,7 @@ module Radiant  
> end  
> private
> 
> - 
> 
> ```
> def restore_response(hash, body)
> 
> ```
> 
> - 
> 
> ```
> def restore_response(hash, body=nil)
> # Cribbed from the Rack::Cache source
> status = hash.delete('X-Status').to_i
> response = Rack::Cache::Response.new(status, hash, body)
> 
> ```

This change finally entered in 0.8.1.

Unfortunatelly I’ve updated my Radiant installation to version 0.8.1 and  
nothing have changed.

I’m experimenting the same problem as before, maybe more predictable:

- the home page end all other pages appear like the Radiant generated  
main site css: /main.css
- deleting tmp/cache and restarting dispatch.fcgi shows the home page  
without css in place of whatever page I try to load

Any clue? Thanks in advance.
