यदि मैं रेल 4 + रूबी 2.0 प्रोजेक्ट में पाठ संपादक में .scss या .erb फ़ाइल संपादित करता हूं, तो मैं ब्राउज़र में लाइव परिवर्तन देखना चाहता हूं।रेल 4 और रूबी 2.0 ऐप के साथ लाइव रीलोड कैसे करें?
मैंने गार्ड और गार्ड-लाइव-रीलोड की कोशिश की, लेकिन यह निम्न त्रुटि फेंक रहा है।
22:58:04 - ERROR - Could not load 'guard/rspec' or find class Guard::Rspec
22:58:04 - ERROR - /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/plugin_util.rb:100:in `require'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/plugin_util.rb:100:in `plugin_class'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/plugin_util.rb:57:in `initialize_plugin'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard.rb:167:in `add_plugin'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/dsl.rb:174:in `block in guard'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/dsl.rb:173:in `each'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/dsl.rb:173:in `guard'
> [#] /home/jitendra/milaap-webapp/Guardfile:4:in `_instance_eval_guardfile'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/guardfile/evaluator.rb:97:in `instance_eval'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/guardfile/evaluator.rb:97:in `_instance_eval_guardfile'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/guardfile/evaluator.rb:37:in `evaluate_guardfile'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/setuper.rb:148:in `evaluate_guardfile'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/setuper.rb:64:in `setup'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/commander.rb:24:in `start'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/cli.rb:107:in `start'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
> [#] /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/bin/guard:6:in `<top (required)>'
> [#] /home/jitendra/.rvm/gems/[email protected]/bin/guard:23:in `load'
> [#] /home/jitendra/.rvm/gems/[email protected]/bin/guard:23:in `<main>'
> [#] /home/jitendra/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `eval'
> [#] /home/jitendra/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `<main>'
22:58:04 - ERROR - Invalid Guardfile, original error is:
> [#] undefined method `superclass' for nil:NilClass
/home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/plugin_util.rb:57:in `initialize_plugin': undefined method `superclass' for nil:NilClass (NoMethodError)
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard.rb:167:in `add_plugin'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/dsl.rb:174:in `block in guard'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/dsl.rb:173:in `each'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/dsl.rb:173:in `guard'
from /home/jitendra/milaap-webapp/Guardfile:4:in `_instance_eval_guardfile'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/guardfile/evaluator.rb:97:in `instance_eval'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/guardfile/evaluator.rb:97:in `_instance_eval_guardfile'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/guardfile/evaluator.rb:37:in `evaluate_guardfile'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/setuper.rb:148:in `evaluate_guardfile'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/setuper.rb:64:in `setup'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/commander.rb:24:in `start'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/lib/guard/cli.rb:107:in `start'
from /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /home/jitendra/.rvm/gems/[email protected]/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /home/jitendra/.rvm/gems/[email protected]/gems/guard-2.6.1/bin/guard:6:in `<top (required)>'
from /home/jitendra/.rvm/gems/[email protected]/bin/guard:23:in `load'
from /home/jitendra/.rvm/gems/[email protected]/bin/guard:23:in `<main>'
from /home/jitendra/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `eval'
from /home/jitendra/.rvm/gems/[email protected]/bin/ruby_executable_hooks:15:in `<main>'
23:40:12 - INFO - LiveReload ब्राउज़र से कनेक्ट होने का इंतजार कर रहा है। –
बढ़िया, अपने ब्राउज़र पर लाइव लोड बटन दबाएं। –
ठीक है यह .erb फ़ाइल में परिवर्तन करने के बाद आउटपुट है http://pastebin.com/SeLfx7qr पृष्ठ भी –