Try to load msgpack first, if it's not there, bail

And tell the user how to fix. This has come up a couple times.
Tod Beardsley 2012-03-02 12:20:29 -06:00
parent faad9db393
commit 4dce560e72
1 changed files with 6 additions and 0 deletions

6
msfgui
View File

@ -7,6 +7,12 @@
# $Revision$
#
begin
require 'msgpack'
rescue LoadError
raise LoadError, "Missing msgpack gem, try 'gem install msgpack' to use MSFGui"
end
msfbase = __FILE__
while File.symlink?(msfbase)
msfbase = File.expand_path(File.readlink(msfbase), File.dirname(msfbase))