2015-10-06 48 views
0

守護程序插件: https://github.com/dougal/daemon_generator扶手:無法安裝守護程序插件

當我做

rails plugin install git://github.com/dougal/daemon_generator.git 

我得到這樣的輸出:

Usage: 
    rails plugin new APP_PATH [options] 

Options: 
    -r, [--ruby=PATH]          # Path to the Ruby binary of your choice 
                 # Default: /home/nicki/.rbenv/versions/2.2.2/bin/ruby 
    -m, [--template=TEMPLATE]        # Path to some plugin template (can be a filesystem path or URL) 
     [--skip-gemfile], [--no-skip-gemfile]    # Don't create a Gemfile 
    -B, [--skip-bundle], [--no-skip-bundle]    # Don't run bundle install 
    -G, [--skip-git], [--no-skip-git]      # Skip .gitignore file 
     [--skip-keeps], [--no-skip-keeps]     # Skip source control .keep files 
    -O, [--skip-active-record], [--no-skip-active-record] # Skip Active Record files 
    -S, [--skip-sprockets], [--no-skip-sprockets]   # Skip Sprockets files 
     [--skip-spring], [--no-skip-spring]    # Don't install Spring application preloader 
    -d, [--database=DATABASE]        # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db/sqlserver/jdbcmysql/jdbcsqlite3/jdbcpostgresql/jdbc) 
                 # Default: sqlite3 
    -j, [--javascript=JAVASCRIPT]       # Preconfigure for selected JavaScript library 
                 # Default: jquery 
    -J, [--skip-javascript], [--no-skip-javascript]  # Skip JavaScript files 
     [--dev], [--no-dev]        # Setup the plugin with Gemfile pointing to your Rails checkout 
     [--edge], [--no-edge]        # Setup the plugin with Gemfile pointing to Rails repository 
     [--skip-turbolinks], [--no-skip-turbolinks]  # Skip turbolinks gem 
    -T, [--skip-test-unit], [--no-skip-test-unit]   # Skip Test::Unit files 
     [--rc=RC]           # Path to file containing extra configuration options for rails command 
     [--no-rc], [--no-no-rc]       # Skip loading of extra configuration options from .railsrc file 
     [--dummy-path=DUMMY_PATH]       # Create dummy application at given path 
                 # Default: test/dummy 
     [--full], [--no-full]        # Generate a rails engine with bundled Rails application for testing 
     [--mountable], [--no-mountable]     # Generate mountable isolated application 
     [--skip-gemspec], [--no-skip-gemspec]    # Skip gemspec file 
     [--skip-gemfile-entry], [--no-skip-gemfile-entry] # If creating plugin in application's directory skip adding entry to Gemfile 

Runtime options: 
    -f, [--force]     # Overwrite files that already exist 
    -p, [--pretend], [--no-pretend] # Run but do not make any changes 
    -q, [--quiet], [--no-quiet]  # Suppress status output 
    -s, [--skip], [--no-skip]  # Skip files that already exist 

Rails options: 
    -h, [--help], [--no-help] # Show this help message and quit 

Description: 
    The 'rails plugin new' command creates a skeleton for developing any 
    kind of Rails extension with ability to run tests using dummy Rails 
    application. 

Example: 
    rails plugin new ~/Code/Ruby/blog 

    This generates a skeletal Rails plugin in ~/Code/Ruby/blog. 
    See the README in the newly created plugin to get going. 

我不知道爲什麼會這樣,我嘗試了在rails應用程序內部以及外部但是沒有運氣的情況下執行此操作!還是一樣。 我使用的鐵軌4.2.3

我也試圖做:

rails plugin new install git://github.com/dougal/daemon_generator.git 

它創造了一些文件。 創建

 create README.rdoc 
     create Rakefile 
     create install.gemspec 
     create MIT-LICENSE 
     create .gitignore 
     create Gemfile 
     create lib/install.rb 
     create lib/tasks/install_tasks.rake 
     create lib/install/version.rb 
     create test/test_helper.rb 
     create test/install_test.rb 
     append Rakefile 
    vendor_app test/dummy 
     run bundle install 
Fetching gem metadata from https://rubygems.org/........... 
Fetching version metadata from https://rubygems.org/.. 
Resolving dependencies........ 
Using rake 10.4.2 
Installing i18n 0.7.0 
Installing json 1.8.3 with native extensions 
Installing minitest 5.8.1 
Installing thread_safe 0.3.5 
Installing tzinfo 1.2.2 
Installing activesupport 4.2.4 
Installing builder 3.2.2 
Installing erubis 2.7.0 
Installing mini_portile 0.6.2 
Installing nokogiri 1.6.6.2 with native extensions 
Installing rails-deprecated_sanitizer 1.0.3 
Installing rails-dom-testing 1.0.7 
Installing loofah 2.0.3 
Installing rails-html-sanitizer 1.0.2 
Installing actionview 4.2.4 
Installing rack 1.6.4 
Installing rack-test 0.6.3 
Installing actionpack 4.2.4 
Installing globalid 0.3.6 
Installing activejob 4.2.4 
Installing mime-types 2.6.2 
Installing mail 2.6.3 
Installing actionmailer 4.2.4 
Installing activemodel 4.2.4 
Installing arel 6.0.3 
Installing activerecord 4.2.4 
Using bundler 1.10.6 
Installing thor 0.19.1 
Installing railties 4.2.4 
Installing sprockets 3.4.0 
Installing sprockets-rails 2.3.3 
Installing rails 4.2.4 
Using install 0.0.1 from source at . 
Installing sqlite3 1.3.10 with native extensions 
Bundle complete! 2 Gemfile dependencies, 35 gems now installed. 
Bundled gems are installed into ./vendor/bundle. 

然後,我測試了使用此命令

rails generate daemon test 

而且我得到了這個錯誤:

Could not find generator 'daemon'. Maybe you meant 'job', 'mailer' or 'task' 
Run `rails generate --help` for more options. 

我無法安裝守護程序的軌道。

當我做:

./script/generate daemon testdaemon 

我得到這個錯誤:

zsh: no such file or directory: ./script/generate 

即使我有這個腳本文件夾。

+0

最後提交5年前是>和問題表明它不工作的軌道3.x的非常好,最有發言權的,他們剛剛安裝的寶石,然後直接使用它, – Doon

+0

我已經把寶石中的Gemfile。 。不知道什麼是錯的,我也沒有手動安裝sudo的創業板安裝守護程序和仍然沒有運氣 – user1735921

回答

2

插件不再適用於rails。任何爲Rails 2書面(或3)不太可能有4個或即將推出的版本5

你可以嘗試的代碼檢查到的lib /,並從內部配置/應用程序所需要的文件工作。

+0

哎你能告訴我守護和sidekiq之間的區別,如果我使用sidekiq,我是否需要安裝守護程序? – user1735921

+1

只是用sidekiq,看到所有的評論在這裏:http://stackoverflow.com/questions/15520676/run-sidekiq-as-daemon-on-ubuntu或其他許多相關的問題! – court3nay

+0

非常感謝!現在我正在使用它,它工作正常 – user1735921