Snorby / snorby

Ruby On Rails Application For Network Security Monitoring
Other
1k stars 226 forks source link

rake snorby:setup error - "cannot load such file -- dm-rails/railtie" #355

Open user98765 opened 9 years ago

user98765 commented 9 years ago

Hello. I installed snorby according to the instructions at snorby.org, but when I run the command

RAILS_ENV=production bundle exec rake snorby:setup

I get the following error:

rake aborted! cannot load such file -- dm-rails/railtie

I ran gem list --local to verify that dm-rails is installed on my system. Version issue maybe?? Not quite sure how to troubleshoot... My system details: a Raspberry Pi running Raspbian. Thanks in advance!

Mister-X- commented 9 years ago

I got the same issue. I even tried to get those packages manually and it didn't work.

It happens on an up to date Ubuntu 12.04 on ARM (on an Utilite Pro to be precise) and if you want to fix it, I can give you access to it.

0xicl33n commented 9 years ago

Same issue on arm with debian wheezy....

root@onionpi[/v/w/snorby:master*]$bundle exec rake snorby:setup --trace rake aborted! cannot load such file -- dm-rails/railtie /var/www/snorby/config/application.rb:5:in require' /var/www/snorby/config/application.rb:5:in<top (required)>' /var/www/snorby/Rakefile:4:in require' /var/www/snorby/Rakefile:4:in<top (required)>' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:in load' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/rake_module.rb:25:inload_rakefile' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:495:in raw_load_rakefile' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:78:inblock in load_rakefile' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:in standard_exception_handling' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:77:inload_rakefile' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:61:in block in run' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:129:instandard_exception_handling' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/lib/rake/application.rb:59:in run' /var/www/snorby/vendor/cache/ruby/1.9.1/gems/rake-0.9.2/bin/rake:32:in<top (required)>' /var/www/snorby/vendor/cache/ruby/1.9.1/bin/rake:23:in load' /var/www/snorby/vendor/cache/ruby/1.9.1/bin/rake:23:in

'

root@onionpi[/v/w/snorby:master*]$gem list --local

* LOCAL GEMS *

actionmailer (4.2.0) actionpack (4.2.0, 3.2.21) actionview (4.2.0) activejob (4.2.0) activemodel (4.2.0, 3.2.21) activerecord (4.2.0) activesupport (4.2.0, 3.2.21) addressable (2.3.7) arel (6.0.0) builder (3.2.2, 3.0.4) bundler (1.8.3) dm-active_model (1.2.1) dm-core (1.2.1) dm-rails (1.2.1) erubis (2.7.0) globalid (0.3.3) hike (1.2.3) i18n (0.7.0) journey (1.0.4) json (1.8.2) loofah (2.0.1) mail (2.6.3) mime-types (2.4.3) mini_portile (0.6.2) minitest (5.5.1) multi_json (1.11.0) nokogiri (1.6.6.2) rack (1.6.0, 1.4.5) rack-cache (1.2) rack-ssl (1.3.4) rack-test (0.6.3) rails (4.2.0) rails-deprecated_sanitizer (1.0.3) rails-dom-testing (1.0.5) rails-html-sanitizer (1.0.1) railties (4.2.0, 3.2.21) rake (10.4.2) rdoc (3.12.2) sprockets (2.12.3, 2.2.3) sprockets-rails (2.2.4) thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) tzinfo (1.2.2)

root@onionpi[/v/w/snorby:master*]$ruby -v ruby 1.9.3p194 (2012-04-20 revision 35410) [arm-linux-eabihf]

There has to be a fix for this...

mandrake74 commented 9 years ago

Exactly the same issue here than 0xicl33n. Almost same gem list, actually populated after bundle install command (I am not using ruby for anything else than snorby):

actionmailer (3.1.12) actionpack (3.1.12) activemodel (3.1.12) activerecord (3.1.12) activeresource (3.1.12) activesupport (3.1.12) addressable (2.3.8, 2.2.8) ansi (1.4.3) arel (2.2.3) bcrypt-ruby (3.0.1) bigdecimal (1.1.0) builder (3.0.4) bundler (1.0.10) cancan (1.6.9) capistrano (2.14.1) capybara (2.0.3) childprocess (0.3.9) chronic (0.3.0) closure-compiler (1.1.8) daemons (1.1.9) data_objects (0.10.12) delayed_job (2.1.4) devise (1.5.4) diff-lcs (1.2.1) dm-active_model (1.2.1) dm-aggregates (1.2.0) dm-ar-finders (1.2.0) dm-chunked_query (0.3.1) dm-constraints (1.2.0) dm-core (1.2.0) dm-devise (1.5.0) dm-do-adapter (1.2.0) dm-migrations (1.2.0) dm-mysql-adapter (1.2.0) dm-observer (1.2.0) dm-pager (1.1.0) dm-rails (1.2.0) dm-serializer (1.2.2) dm-timestamps (1.2.0) dm-transactions (1.2.0) dm-types (1.2.2) dm-validations (1.2.0) dm-visualizer (0.1.0) dm-zone-types (0.3) do_mysql (0.10.12) env (0.3.0) erubis (2.7.0) eventmachine (1.0.3) fastercsv (1.5.5) ffi (1.0.11) geoip (1.1.2) highline (1.6.16) hike (1.2.1) home_run (1.0.9) i18n (0.6.4) io-console (0.3) jammit (0.5.4) jquery-rails (2.2.1) json (1.7.7, 1.5.5) json_pure (1.7.7) launchy (2.1.0) letter_opener (1.0.0) mail (2.4.4) mime-types (1.21) minitest (4.7.0, 2.5.1) multi_json (1.7.2) net-dns (0.6.1) net-scp (1.1.0) net-sftp (2.1.1) net-ssh (2.6.6) net-ssh-gateway (1.2.0) netaddr (1.5.0) nokogiri (1.5.9) open4 (1.3.0) orm_adapter (0.0.7) pdfkit (0.4.6) Platform (0.4.0) polyglot (0.3.3) POpen4 (0.1.4) rack (1.3.10) rack-cache (1.2) rack-mount (0.8.3) rack-ssl (1.3.3) rack-test (0.6.2) rails (3.1.12) railties (3.1.12) rake (0.9.2.2, 0.9.2) rdoc (3.12.2, 3.9.5) RedCloth (4.2.9) request_store (1.0.5) rspec (2.0.1) rspec-core (2.0.1) rspec-expectations (2.0.1) rspec-mocks (2.0.1) rspec-rails (2.0.1) ruby-graphviz (1.0.8) rubycas-client (2.3.9) rubyzip (0.9.9) selenium-webdriver (2.31.0) simple_form (1.2.2) sprockets (2.0.4) stringex (1.5.1) thin (1.5.1) thor (0.14.6) tilt (1.3.6) timezone_local (0.1.5) treetop (1.4.12) turn (0.9.6) tzinfo (0.3.37) uuidtools (2.1.3) warden (1.2.1) websocket (1.0.7) whois (2.3.0) xpath (1.0.0) yui-compressor (0.9.6)

I think it's the first time I could not resolve such issue by myself if not finding it on Internet. Good way to learn how a ruby system should work tough... I think I have tried everything at a system level on a debian wheezy. Since it was not working with debian 1.9.3 apt packages, I have installed it from source following http://collectiveidea.com/blog/archives/2011/10/31/install-ruby-193-with-libyaml-on-centos/ tutorial but I have ended with the exact same error.

I have also tried with a fresh ruby 2.2.1 install and with the latest rails version, but if failed again (with a different error message). I have then figured out that ruby 2.x versions are not supported by Snorby (or at least it is what I have read on the web).

I am pulling the last snorby version from git master, so I would really appreciate to have some advice on how to fix this, even if I need to slightly change the ruby code somewhere.

It looks like plenty of people are experiencing the same issue without any response. Simplicity you said? I must be very dumb then..thanks for your help!

mandrake74 commented 9 years ago

Hi, it looks like posting here as a last chance gave me finally the clue of what was wrong! Thanks Github god! ;-)

Having a second look to the gem list diff between mine and @0xicl33n, and seen some similar issues with other rails applications involving bundler, I have just installed the following gems specific versions for bundler and dm-rails: gem install dm-rails -v 1.2.1 gem install bundler -v 1.2.1

And now it works! Just start snorby with: rake snorby:setup EDIT: actually I have still a warning message from Jammit since I don't have java installed, but this will be much easier to fix.

Btw I just don't know why these versions are not installed by default using the Gemfile provided in the snorby git, it might worth to update this Gemfile with the correct versions to make it working out of the box.

Hope this will help other people who where desperately trying to make snorby working on a debian wheezy (actually I'm using a kali 1.0.9 distro)..

Cheers, Mdk