I have noticed that if I have an application layout (app/views/layouts/ application.html.erb) and I copy it to a backup file (e.g., app/views/ layouts/application.html.erb.bak) and then make changes to the original, for some reason Rails seems to want to refer to the .bak file rather than the original file. So, changes that I make to the original file are effectively ignored. I''ve now been caught by this anomaly twice now. I think it''s time that I understood it. An explanation would be appreciated. Thanks. ... doug -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2009/11/25 doug <ddjolley-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> I have noticed that if I have an application layout (app/views/layouts/ > application.html.erb) and I copy it to a backup file (e.g., app/views/ > layouts/application.html.erb.bak) and then make changes to the > original, for some reason Rails seems to want to refer to the .bak > file rather than the original file. So, changes that I make to the > original file are effectively ignored. I''ve now been caught by this > anomaly twice now. I think it''s time that I understood it. An > explanation would be appreciated. Thanks.This was a bug in some versions of Rails (2.3.? I think). I believe it is fixed in current Rails. The workaround is not to have any extra files, such as backups, in view folders. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The bug you''re tripping over here looks like this one: https://rails.lighthouseapp.com/projects/8994/tickets/1818-wrong-view-rendered The solution in the short term is to not leave backup files laying around. That''s what source control is for... --Matt Joens On Nov 24, 11:15 pm, doug <ddjol...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have noticed that if I have an application layout (app/views/layouts/ > application.html.erb) and I copy it to a backup file (e.g., app/views/ > layouts/application.html.erb.bak) and then make changes to the > original, for some reason Rails seems to want to refer to the .bak > file rather than the original file. So, changes that I make to the > original file are effectively ignored. I''ve now been caught by this > anomaly twice now. I think it''s time that I understood it. An > explanation would be appreciated. Thanks. > > ... doug-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> This was a bug in some versions of Rails (2.3.? I think). I believe > it is fixed in current Rails.I am running 2.3.2. Apparently that is an affected version. Anyway, glad to understand the issue. Thanks to all for the input. ... doug -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.