繁体   English   中英

RAILS:无法安装守护程序插件

[英]RAILS: Unable to install daemon plugin

守护程序插件: 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应用程序内部和外部进行此操作,但是没有运气! 还是一样。 我正在使用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.

我无法为Rails安装守护程序。

当我这样做时:

./script/generate daemon testdaemon

我收到此错误:

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

即使我有脚本文件夹。

Rails的插件不再存在。 为Rails 2(或3)编写的任何内容都不太可能与4或即将推出的版本5一起使用。

您可以尝试将代码检入lib /并要求config / application中的文件。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM