0

I've experienced a strange bug with rails 3.2 / git.

In development mode, classes was not reloaded between requests (controllers, models, helpers) but views work.

I've searched a long time in unmodified configuration (application.rb, development.rb...) without success, I have to reload Thin to show changes.

So I've decided to create a new branch and revert commit by commit (I was thinking a bad updated/integration gem) and the code reload properly to the last commit !

Back to the master branch, code is reloaded properly between requests without any code change.

I'm running on Archlinux, ruby 1.9.3p194 (rvm), postgresql 9.1.4, git 1.7.11.1, ext4 FS tuned (UUID=ac74249f-84de-40d0-8b14-eb494983cfda /home ext4 defaults,noatime,data=writeback,barrier=0,nobh,errors=remount-ro 0 1)

What do you think about that ?


This bug never came back and very difficult to reproduce. I can't accept uncertain answers.

4

2 回答 2

2

我认为您的问题与GIT无关,仅与rails有关。

尝试放入您的 config/environments/development.rb:

  config.cache_classes = false

这是 rails 配置,它告诉它在请求之间重新加载类(例如模型或控制器)。

可以肯定的是,使用以下命令运行 rails 服务器:RAILS_ENV=development rails s

于 2012-07-11T15:37:05.113 回答
0

也许问题在于noatimefstab 中的选项。如果未触及时间戳,文件已更改,现在应该如何处理。您可以尝试删除该选项。

于 2012-10-24T13:44:08.320 回答