passbe/beef-migration-test-3 — Issue #553: Add `win32console` to the list of required gems
Author: passbe
Created: 2011-12-09 01:28:26+00:00
State: open

The win32console gem is required for Windows environments else the following error is thrown:

/home/user/beef-code/extensions/console/shell.rb:25:in `<class:Shell>': uninitialized constant BeEF::Extension::Console::Shell::Rex (NameError)
from /home/user/beef-code/extensions/console/shell.rb:20:in `<module:Console>'
from /home/user/beef-code/extensions/console/shell.rb:18:in `<module:Extension>'
from /home/user/beef-code/extensions/console/shell.rb:17:in `<module:BeEF>'
from /home/user/beef-code/extensions/console/shell.rb:16:in `<top (required)>'

Adding something like this to the installer should install the gem in windows and cygwin environments:

require 'rbconfig'

if Config::CONFIG['host_os'] =~ /mswin|mingw/
$gems_required << "win32console"
end

Google Code Issue: http://code.google.com/p/beef/issues/detail?id=491