본문 바로가기

프로그램 경험/Ruby/Rails

[Rails] 개발 모드 변경하기

레드마인은 레일즈로 만들어져 있다.

레드마인을 사용하는데 겐트 차트의 디자인을 조금 수정하고 페이지를 보니 수정이 반영되질 않는다.

웹서버를 재시작 해야만 반영된다. 망할...


개발 모드로 변경하는 방법을 모르겠다..ㅜㅜ


-----------------------------------------------

찾았다!!!

[Rails App Path]\config\environment.rb 를 수정 하면 된다.


# Load the rails application

require File.expand_path('../application', __FILE__)


# Make sure there's no plugin in vendor/plugin before starting

vendor_plugins_dir = File.join(Rails.root, "vendor", "plugins")

if Dir.glob(File.join(vendor_plugins_dir, "*")).any?

  $stderr.puts "Plugins in vendor/plugins (#{vendor_plugins_dir}) are no longer allowed. " +

    "Please, put your Redmine plugins in the `plugins` directory at the root of your " +

    "Redmine directory (#{File.join(Rails.root, "plugins")})"

  exit 1

end


#이것이 운영모드로서 소스 수정후 웹서버 재시작 해야 함.

#ENV['RAILS_ENV'] ||= 'production'


#이것은 개발모드로서 소스 수정후 웹서버 재시작 안해도 됨^^

ENV['RAILS_ENV'] ||= 'development'



#안되면 아래 있는것들도 시도 해 볼것

#Rails.env ||= ActiveSupport::StringInquirer.new('production')

#Rails.env ||= ActiveSupport::StringInquirer.new('development')


#::Rails.env ||= 'production'

#::Rails.env ||= 'development'



# Initialize the rails application

RedmineApp::Application.initialize!



이러고도 안되면 아마 Thin_redmine을 재 실행 하지 않아서 일것이다.
Thin_redmine 서비스를 재실행 하라.


-------------------------------------

이래 저래 다해봐도 안된다... 수정이 반영이 안된다... 짜증남..

왠지 개발모드로 돌아가지 않는것 같다.


그래서 config/environments/production.rb 파일을 열었다.


config.cache_classes = true

config.action_controller.perform_caching = true


이 두부분을 모두 false로 하니까 이제 수정해도 바로 반영된다.

역시 개발모드가 적용되질 않는것이다. 제길..