I just installed metasploit. The issue is I can only run ./msfconsole in installation directory which is /opt/framework/metasploit-framework.
When I run msfconsole in another directory, I get this error:
Could not find rake-10.4.2 in any of the sources
Run `bundle install` to install missing gems.
In my .bashrc file :
export PATH="$PATH:$HOME/.rvm/bin"
export PATH="$PATH:$HOME/.gem/ruby/2.3.0/bin"
export PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
export PATH=$PATH:/opt/framework/metasploit-framework
alias msfconsole="./msfconsole --quiet -x \"db_connect ${USER}@msf\""
My solution so far (I have to exit to /opt/framework/metasploit-framework though) :
alias msfconsole="cd /opt/framework/metasploit-framework && ./msfconsole --quiet -x \"db_connect ${USER}@msf\""