Strange error on the first request - trying to setup Rails 2.3.5 with Bundler

I’m trying to use Bundler for existing Rails 2.3.5 app and got a very
strange problem.

The problem is that on the very first request only the contents of the
action view file are rendered - i.e. when loading the home page
(controller: home, action: index) I get only contents of the app/views/
home/index.html.haml file as the response with no layout at all. On
the second and on subsequent requests everything is ok.

I.e. if my app/views/layouts/application.html.haml file has just
string “LAYOUT” and app/views/home/index.html.haml has string “VIEW”,
I get “VIEW” as a response for the first request and “LAYOUT” as a
response for the second request.

It causes problems i.e. when running Cucumber features, because i.e. I
access login form that is rendered in the layout file :slight_smile:

Any idea what can be wrong?

The app uses gems that need to be required in a special order (i.e.
authlogic must be required before resource-controller), so I don’t use
Bundler.require, but manually require all gems.

Cheers,
Szymek

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs