在开发过程中,我使用liveReload
进行保护。为了使它运行,我不得不将这几行添加到config.ru
文件:
require 'rack-livereload'
use Rack::LiveReload
在线路CCD_ 3之前。没有这些线路LiveReload
对我不起作用。
gem guard-livereload
和rack-livereload
属于Gemfile的开发组。
但当我推送到heroku服务器时,我收到了一条消息:
/app/vendor/bundle/ruby/1.9.1/gems/activesupport-
3.2.2/lib/active_support/dependencies.rb:251:in `require':
no such file to load -- rack-livereload (LoadError)
显然是因为livereload
,如何从生产中消除livereload
配置?
我认为您不需要在config.ru文件中添加任何内容(这只是针对Sinatra的)。
gem安装指南中都没有提到Rails的这一点,机架重新加载设置位于config/environments/development.rb 中
https://github.com/guard/guard-livereload/
https://github.com/johnbintz/rack-livereload/