2014-12-18 2 views
0

나는 설정 가드와 나의 새로운 레일에 구아 - Livereload 내가 이전에 있었다 방법에 유사하게 투영 한Guard LiveRoad가 서버를 시작하지 않는 이유는 무엇입니까? Gemfile :

group :development do 
    gem 'spork-rails', '4.0.0' 
    gem 'guard-spork', '1.5.0' 
    gem 'childprocess' 
    gem "rspec-rails" 
    gem 'guard-livereload', require: false 
    gem 'spring' 
    gem "guard-rspec" 
end 

그리고 내 Guardfile에 :

guard 'livereload' do 
    watch(%r{app/views/.+\.(erb|haml|slim)$}) 
    watch(%r{app/helpers/.+\.rb}) 
    watch(%r{app/assets/.+\.rb}) 
    watch(%r{app/assets/.+\.(css|js|scss|jpg|png)}) 
    watch(%r{public/.+\.(css|js|html)}) 
    watch(%r{config/locales/.+\.yml}) 
    # Rails Assets Pipeline 
    watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" } 
end 

후 생성 된 명령 guard init guard-livereload을 발행하십시오. 내가 guard을 실행하면 나는 다음과 같은 메시지를 볼 수 있습니다

18:35:41 - INFO - Guard is using TerminalTitle to send notifications. 
18:35:43 - INFO - Guard::RSpec is running 
18:35:43 - INFO - LiveReload is waiting for a browser to connect. 
18:35:43 - INFO - Guard is now watching at    '/Volumes/volume/Users/myuser/Documents/RubyApps/myapp' 
[1] guard(main)> 

그러나 서버가 시작되지 않습니다, 나는 서버를 시작하고 프런트 엔드에 표시됩니다 rails s 그러나합니다. 이로 인해 문제는 경비원에게 있다고 믿습니다. 누구든지 올바른 방향으로 나를 가리킬 수 있습니까?

많은 감사

편집 추가 콘솔 guard -d를 실행 한 후

:

18:31:56 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A' 
18:31:56 - INFO - Guard is using TerminalTitle to send notifications. 
18:31:57 - DEBUG - Command execution: hash stty 
18:31:57 - DEBUG - Guard starts all plugins 
18:31:57 - DEBUG - Hook :start_begin executed for Guard::RSpec 
18:31:57 - INFO - Guard::RSpec is running 
18:31:57 - DEBUG - Hook :start_end executed for Guard::RSpec 
18:31:57 - DEBUG - Hook :start_begin executed for Guard::LiveReload 
18:31:57 - DEBUG - Hook :start_end executed for Guard::LiveReload 
18:31:57 - INFO - LiveReload is waiting for a browser to connect. 
18:31:57 - INFO - Guard is now watching at '/Volumes/fenix/Users/wagner/Documents/htdocs/RubyApps/turing' 
18:31:57 - DEBUG - Start interactor 
18:31:57 - DEBUG - Command execution: stty -g 2>/dev/null` 

답변

0

보기 @ec2에서 '이에서의 최근의 코멘트 : livereload에 대한

와 실행 가드' -d '옵션 (번들 exec guard -d)을 실행하면 Guard :: LiveReload에 대해 실행 된 run_on_modifications_begin이 표시됩니다. 그 메시지를 받았는지 여부를 알려주십시오 (다음 단계는 대답에 달려 있습니다). 그리고 당연히 livereload가 브라우저에서 실제로 켜져 있는지 확인하십시오. (프로젝트를 시작할 때마다 활성화해야합니다.) 이상적으로 브라우저에서 고정 html 파일을 열어 파일을 편집하고 확인하면됩니다.

+0

필자가 제안한대로 실행했지만'Hook : run_on_modification_begin' 메시지가 표시되지 않았습니다. 내 질문을 편집하여 메시지를 추가했습니다. – WagnerMatosUK

+0

전체'Guardfile'을 게시 할 수 있습니까? –