Я пытаюсь установить snorby
на мой ubuntu 16.04
рабочий стол, но когда я запускаю RAILS_ENV=production bundle exec rake snorby:setup.
, я получаю ошибку rake aborted! Don't know how to build task 'snorby:setup'
. Кто-нибудь может помочь мне решить проблему? Большое спасибо. и это мой 'Gamefile'
ОБНОВЛЕНИЕ: Загрузите мой RAILS_ENV = рабочий пакет exe c rake -vT и файл /lib/tasks/snorby.rake
source 'https://rubygems.org'
RAILS_VERSION = '3.2.22'
RSPEC_VERSION = '~> 2.0.0'
DATAMAPPER = 'https://github.com/datamapper'
DM_VERSION = '~> 1.2.0'
gem 'rubocop', require: false ## This is not the original gamefile, I added this gamefile to another package, which is rubocop. because before I get the message "Rake Aborted: needed Rubocop / task_file. You can notice" gem 'rubocop', require: false"
gem 'rake', '0.9.2'
gem 'request_store', '~> 1.0.5'
gem 'rails', RAILS_VERSION
gem 'jquery-rails'
gem 'bundler', '>= 1.0.0'
gem 'env'
gem 'json', '~> 1.8.3'
# Jruby
gem 'jruby-openssl', :platforms => :jruby
gem 'warbler', :platforms => :jruby
gem 'jruby-rack-worker', :platforms => :jruby
# gem 'glassfish', :platforms => :jruby
# DateTime Patches
gem 'home_run', :require => 'date', :platforms => :mri
gem 'activesupport', RAILS_VERSION, :require => 'active_support'
gem 'actionpack', RAILS_VERSION, :require => 'action_pack'
gem 'actionmailer', RAILS_VERSION, :require => 'action_mailer'
gem 'railties', RAILS_VERSION, :require => 'rails'
gem 'dm-core', DM_VERSION
gem 'dm-rails', DM_VERSION
gem 'dm-do-adapter', DM_VERSION
gem 'dm-active_model', DM_VERSION
gem 'dm-mysql-adapter', DM_VERSION
gem 'dm-postgres-adapter', DM_VERSION
gem 'dm-pager', '~> 1.1.0'
gem "dm-ar-finders", DM_VERSION
gem 'dm-migrations', DM_VERSION
gem 'dm-types', DM_VERSION
gem 'dm-validations', DM_VERSION
gem 'dm-constraints', DM_VERSION
gem 'dm-transactions', DM_VERSION
gem 'dm-aggregates', DM_VERSION
gem 'dm-timestamps', DM_VERSION
gem 'dm-observer', DM_VERSION
gem 'dm-serializer', DM_VERSION
gem 'dm-is-read_only', '~> 0.3', :git => 'https://github.com/postmodern/dm-is-read_only.git'
gem 'dm-chunked_query', '~> 0.3'
# Deploy with Capistrano
gem 'capistrano', '2.14.1'
# Rails Plugins
gem 'jammit', '~> 0.5.4'
gem 'cancan', '~> 1.6'
gem 'devise', '~> 1.4'
gem 'dm-devise', '~> 1.5'
gem 'rubycas-client'
gem 'devise_cas_authenticatable'
gem "mail", '~> 2.3'
gem "RedCloth", "~> 4.2.9", :require => 'redcloth'
gem 'chronic', '~> 0.3.0'
gem 'pdfkit', '~> 0.4.6'
gem 'ezprint', :git => 'https://github.com/mephux/ezprint.git', :branch => 'rails3', :require => 'ezprint'
gem 'daemons', '~> 1.1.0'
gem 'delayed_job', '~> 2.1.4'
gem 'delayed_job_data_mapper', '~> 1.0.0.rc', :git => 'https://github.com/Snorby/delayed_job_data_mapper.git'
# Working On This
# gem 'delayed_job', '~> 3.0'
# gem 'delayed_job_data_mapper', '~> 1.0.0.rc', :git => 'https://github.com/collectiveidea/delayed_job_data_mapper.git'
# Old - Remove Avatar Support
# gem 'rmagick', '~> 2.13.1'
# gem 'dm-paperclip', '~> 2.4.1', :git => 'https://github.com/Snorby/dm-paperclip.git'
gem 'net-dns', '~> 0.8.0'
gem 'whois', '~> 2.3.0'
gem 'simple_form', '~> 1.2.2'
gem 'geoip', '~> 1.1.1'
gem 'netaddr', '~> 1.5.0'
gem 'dm-zone-types', '~> 0.3'
gem 'timezone_local', '~> 0.1.5'
group(:development) do
gem "letter_opener"
gem 'thin'
gem 'byebug'
end
group(:test) do
gem 'capybara'
gem 'test-unit'
gem 'rspec', RSPEC_VERSION
gem 'rspec-core', RSPEC_VERSION, :require => 'rspec/core'
gem 'rspec-expectations', RSPEC_VERSION, :require => 'rspec/expectations'
gem 'rspec-rails', RSPEC_VERSION
gem 'ansi'
gem 'turn'
gem 'minitest'
end
group(:doc) do
gem 'dm-visualizer', '~> 0.1.0'
end
Это не Исходный файл игры, я добавил этот файл игры в другой пакет, который называется rubocop. потому что, прежде чем я получаю сообщение «Rake Aborted: необходим Rubocop / файл_задачи. Вы можете заметить« gem 'rubocop', require: false »
# Snorby - All About Simplicity.
#
# Copyright (c) 2012 Dustin Willis Webber (dustin.webber at gmail.com)
#
# Snorby is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Foobar is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Foobar. If not, see <http://www.gnu.org/licenses/>.
require "./lib/snorby/dm/types"
require "./lib/snorby/jobs"
require "./lib/snorby/worker"
namespace :snorby do
desc 'Setup'
task :setup => :environment do
Rake::Task['secret'].invoke
# Create the snorby database if it does not currently exist
Rake::Task['db:create'].invoke
# Snorby update logic
Rake::Task['snorby:update'].invoke
end
desc 'Update Snorby'
task :update => :environment do
# Setup the snorby database
Rake::Task['db:autoupgrade'].invoke
# Load Default Records
Rake::Task['db:seed'].invoke
# Restart Worker
Rake::Task['snorby:restart_worker'].invoke
end
desc 'Update Snorby DB'
task :dbupdate => :environment do
# Setup the snorby database
Rake::Task['db:autoupgrade'].invoke
# Load Default Records
Rake::Task['db:seed'].invoke
end
desc 'Remove Old CSS/JS packages and re-bundle'
task :refresh => :environment do
`jammit`
end
desc 'Start Snorby Worker if not running'
task :start_worker => :environment do
if Snorby::Worker.running?
exit 0
end
# otherwise, restart worker.
Rake::Task['snorby:restart_worker'].invoke
end
desc 'Restart Worker/Jobs'
task :restart_worker => :environment do
if Snorby::Worker.running?
puts '* Stopping the Snorby worker process.'
Snorby::Worker.stop
end
count = 0
stopped = false
while !stopped
stopped = true unless Snorby::Worker.running?
sleep 5
count += 1
if count > 10
STDERR.puts "[X] Error: Unable to stop the Snorby worker process."
exit -1
end
end
unless Snorby::Worker.running?
puts "* Removing old jobs"
Snorby::Jobs.find.all.destroy
puts "* Starting the Snorby worker process."
Snorby::Worker.start
count = 0
ready = false
while !ready
ready = true if Snorby::Worker.running?
sleep 5
count += 1
if count > 10
ready = true
end
end
if Snorby::Worker.running?
Snorby::Jobs.find.all.destroy
puts "* Adding jobs to the queue"
Snorby::Jobs.run_now!
else
STDERR.puts "[X] Error: Unable to start the Snorby worker process."
exit -1
end
end
end
desc 'Soft Reset - Reset Snorby metrics'
task :soft_reset => :environment do
# Reset Counter Cache Columns
puts 'Reseting Snorby metrics and counter cache columns'
Severity.update!(:events_count => 0)
Sensor.update!(:events_count => 0)
Signature.update!(:events_count => 0)
puts 'This could take awhile. Please wait while the Snorby cache is rebuilt.'
Snorby::Jobs.reset_cache(:all, true)
end
desc 'Hard Reset - Rebuild Snorby Database'
task :hard_reset => :environment do
# Drop the snorby database if it exists
Rake::Task['db:drop'].invoke
# Invoke the snorby:setup rake task
Rake::Task['snorby:setup'].invoke
end
end
Этот файл /lib/tasks/snorby.rake
Вывод этого изображения:
RAILS_ENV = exe рабочего комплекта c rake snorby: setup
RAILS_ENV = exe рабочего комплекта c rake - vT
РЕДАКТИРОВАТЬ: РЕШЕНО Моя проблема. Вы должны установить:
gem install bundler -v 1.17.1 gem install rails -v 4.2.2 gem install sprockets -v 3.7.2 gem install rake --version = 0.9.2
или, если вы хотите установить Suricata, Snorby и barnyard2, советую вам выполнить следующее: guide install