Webrick开发服务器需要重启(config.cache_classes = false)

时间:2013-06-04 12:21:08

标签: ruby-on-rails webrick

使用Rails 3.2.11

我正在开发一个开发项目,几天前我意识到每次我在控制器或模型中进行更改时都需要重新启动服务器,以便显示这些更改。

自我验证后,StackOverflow上的10多个类似问题没有帮助:

  1. config.cache_classes = false在development.rb

  2. 我在开发模式下运行

  3. 我不使用rails 3.2.4

  4. 我没有在开发模式中使用独角兽,我已经删除了所有与独角兽相关的东西(为了排除故障),但它没有帮助。

    因为当我开始发生这种情况时我无法真正放置,所以每次重新加载页面时都会遇到严重问题,试图找出破坏所有类和模型重新加载的问题(就像我习惯的那样)。它肯定是一个设置,一个宝石或我使用的东西,但我无法真正放置它可能是什么。

    所以,我需要帮助的是:如何解决此问题?在我的代码中我应该寻找什么可能导致这种情况?

    我的Gemfile

    source 'https://rubygems.org'
    
    gem 'rails', '3.2.11' gem 'json', '~> 1.7.7' gem 'pg'
    
    # Bundle edge Rails instead:
    # gem 'rails', :git => 'git://github.com/rails/rails.git'
    
    group :production do   gem 'newrelic_rpm'   gem 'heroku_rails_deflate' gem 'exception_notification'        gem "SystemTimer", :require => "system_timer", :platforms => :ruby_18     gem 'rack-timeout'   gem 'heroku-api'   gem 'unicorn'      gem 'dalli'     gem 'memcachier'     end
    
    group :development do      gem 'system_timer' # Must be loaded for assets:precompile, causes problem on Heroku though    gem 'yaml_db'    gem 'fastercsv'   end
    
    gem 'feedback' gem 'jquery-rails' gem 'rails3-jquery-autocomplete' gem 'googleajax' gem 'friendly_id' gem 'acts_as_tree_rails3' gem 'will_paginate' gem 'sitemap_generator' gem 'breadcrumbs_on_rails' gem 'facebox-rails' gem 'redcarpet' # Markup gem 'hirb' # Pretty command output
    
    gem 'rails3-jquery-autocomplete' gem 'authlogic' gem 'nokogiri' gem 'formtastic' gem 'bcrypt-ruby' # Believe this has to do with admin stylesheets
    
    
    # Gems used only for assets and not required
    # in production environments by default. group :assets do   gem 'sass-rails',   '~> 3.2.3'   gem 'coffee-rails', '~> 3.2.1'   gem 'uglifier', '>= 1.0.3'   gem 'compass'   gem 'compass-rails' end
    
    # To use ActiveModel has_secure_password
    # gem 'bcrypt-ruby', '~> 3.0.0'
    
    # To use Jbuilder templates for JSON
    # gem 'jbuilder'
    
    # Use unicorn as the app server
    # gem 'unicorn'
    
    # Deploy with Capistrano
    # gem 'capistrano'
    
    # To use debugger
    # gem 'ruby-debug'
    

0 个答案:

没有答案