[英]guard-annotate gem is not working
寶石文件
gem 'annotate'
gem 'guard'
gem 'guard-annotate'
保護文件
guard 'annotate', :run_at_start => false do
watch( 'db/schema.rb' )
# Uncomment the following line if you also want to run annotate anytime
# a model file changes
watch( 'app/models/*.rb' )
# Uncomment the following line if you are running routes annotation
# with the ":routes => true" option
watch( 'config/routes.rb' )
end
當我運行“注釋”(沒有警衛)時,它運行良好。 當我運行后衛時,我發現后衛注釋不起作用。
這是痕跡
$ 捆綁執行衛隊
09:33:56 - INFO - Guard is using NotifySend to send notifications.
09:33:56 - INFO - Guard is using TerminalTitle to send notifications.
09:33:56 - INFO - Guard is now watching at '/home/user/work/projects/a/alumni-not'
[1] guard(main)>
09:34:56 - INFO - Run all
[2] guard(main)>
09:34:56 - INFO - Run all
[3] guard(main)>
調試跟蹤
$ bundle exec guard --plugin注釋-d
16:48:13 - DEBUG - Command execution: emacsclient --eval '1' 2> /dev/null || echo 'N/A'
16:48:13 - INFO - Guard is using Libnotify to send notifications.
16:48:13 - INFO - Guard is using TerminalTitle to send notifications.
16:48:13 - DEBUG - Command execution: hash stty
16:48:13 - DEBUG - Guard starts all plugins
16:48:13 - DEBUG - Hook :start_begin executed for Guard::Annotate
16:48:13 - DEBUG - Hook :start_end executed for Guard::Annotate
16:48:13 - INFO - Guard is now watching at '/home/user/work/projects/a/alumni-not'
16:48:13 - DEBUG - Start interactor
[1] Annotate guard(main)>
16:48:23 - INFO - Run all
16:48:23 - DEBUG - Hook :run_all_begin executed for Guard::Annotate
16:48:23 - DEBUG - Hook :run_all_end executed for Guard::Annotate
我在這里找不到任何結果,但可以找到一些處理過程。如何解決此問題? 我應該在哪里看到帶注釋的結果?
寶石文件
寶石“ rails”,“ 3.1.0”寶石“ rake”,“ 0.8.7”
組:發展做寶石“注釋”,“ 2.5.0”結束
命令行:
$ gem install annotate成功安裝annotate-2.5.0已安裝1個gem
Guard批注未實現run_all
插件API ,因此run all對批注Guard無效。
我不知道帶注釋的gem,但是從快速的外觀來看,它似乎總能注釋每個模型並且沒有選擇性的重新生成,因此您只需觸發一個文件更改即可,例如
[1] guard(main)> c db/schema.rb
這應該運行注釋。
另一種選擇是發送拉取請求以實現run_all
方法,例如:
def run_all
run_annotate
end
這使您可以將annotate
到Guard命令提示符下以運行注釋。
使用特定版本的gem "jquery-rails", "~> 2.3.0"
因為更高版本的gem刪除了ui部分。
要么
您可以為jquery-ui
使用gem "jquery-ui-rails"
。 有關更多信息,請訪問git存儲庫
要需要所有jQuery UI模塊,請將以下內容添加到application.js:
//= require jquery.ui.all
還將jQuery UI CSS添加到application.css:
/*
*= require jquery.ui.all
*/
希望這可以幫助您
您是在命令提示符下運行此程序嗎? 如果是這樣,請嘗試bundle exec注釋用戶以使用捆綁的gem,而不是系統的gem。
寶石被稱為“注釋”或“注釋模型”嗎?
它不是注釋寶石嗎? 它的github存儲庫稱為annotate_models。
注釋模型gem不同,並且已經有一段時間沒有更新了。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.