Ruby on rails 找不到gem';pg(=0.12.4)红宝石';在gem文件中列出的任何gem源中,或在本机上可用

Ruby on rails 找不到gem';pg(=0.12.4)红宝石';在gem文件中列出的任何gem源中,或在本机上可用,ruby-on-rails,ruby,gem,rubygems,gemfile,Ruby On Rails,Ruby,Gem,Rubygems,Gemfile,我正在尝试在我的Kali box上运行以下命令,请参阅错误 root@kali:~# ruby /usr/share/metasploit-framework/tools/nasm_shell.rb Could not find rake-10.4.2 in any of the sources Run `bundle install` to install missing gems. 然后,我运行bundle安装并得到以下错误: Could not find gem 'pg (= 0.12.

我正在尝试在我的Kali box上运行以下命令,请参阅错误

root@kali:~# ruby /usr/share/metasploit-framework/tools/nasm_shell.rb
Could not find rake-10.4.2 in any of the sources
Run `bundle install` to install missing gems.
然后,我运行bundle安装并得到以下错误:

Could not find gem 'pg (= 0.12.4) ruby' in any of the gem sources listed in your Gemfile or available on this machine.
错误还在继续!我安装了RVM,因为这也是一个问题。我运行包更新,没有运气。等等

我的档案如下:

 require 'pathname'

# During build, the Gemfile is temporarily moved and
# we must manually define the project root
if ENV['MSP_ROOT']
  root = Pathname.new(ENV['MSP_ROOT'])
else
  root = Pathname.new(__FILE__).parent
end
metamodules_load_path = root.join('metamodules', 'lib').expand_path.to_path

unless $LOAD_PATH.include? metamodules_load_path
  $LOAD_PATH.unshift metamodules_load_path
end

require 'metasploit/pro/metamodules'

source 'https://rubygems.org'

# All gems are listed alphabetically within their own group or sections.  When adding a gem please add a comment above
# the declaration explaining why the gem was added.

#
# Root
#

gemspec path: 'ui'
gemspec path: 'engine'
gemspec name: 'metasploit-framework-full', path: 'msf3'

Metasploit::Pro::Metamodules.gemspecs(self)

# We purchase and use RailsLTS which is slipstreamed into our build process.
# RailsLTS requires this publically available gem.
# Please note, installing this gem on its own does not install RailsLTS.
gem 'railslts-version', '>= 3.2.21'

# CSS helpers
gem 'compass'
# Make white listed rails routes available in javasript
gem 'js-routes'
# Delayed jobs on linux needs daemons
gem 'daemons', :platforms => :ruby
# Used to pass static data to javasript from Ruby
gem 'gon'
# Jbuilder for Builder-eque JSON templates
gem 'jbuilder'
# Javascript framework for the UI
gem 'jquery-rails', '~> 3.1.1'
# Pagination
gem 'kaminari', '~> 0.14.0'
# Metasploit credential models
gem 'metasploit-credential', '~> 0.14.5'


# Mdm models
gem 'metasploit_data_models', '~> 0.24.0'
# MIME type identification for files
gem 'mime-types', '1.18', :git => 'git://github.com/rapid7/mime-types.git'
# Adds to Rails 3 deprecated prototype JS helpers from Rails 2
gem 'prototype_legacy_helper', '0.0.0', :git => 'git://github.com/jvennix-r7/prototype_legacy_helper.git'
# RestClient needed for nexpose vuln verification
gem 'rest-client', '~> 1.6.7'
# parses robot.txt files for thin
gem 'robots', '0.10.1'
# TODO: REMOVE RSPEC!!!!!
# See https://jira.tor.rapid7.com/browse/MSP-10788
gem 'rspec'
# webserver
gem 'thin'
# treetop is needed by the mail gem, but for some reason isn't properly
# included when omitting development and test bundler groups
gem 'treetop'

#
# pcap group from metasploit-framework
#

# PCAPRUB
gem 'pcaprub', :git => 'git://github.com/bturner-r7/pcaprub.git', :branch => 'rapid7'
# Secure web headers and XSS defense-in-depth
gem 'secure_headers'


#
# Extension gems.
#

# JSON parsing
gem 'json'
# RPC library for API calls in controllers
gem 'msgpack'
# Parses HTML for webpage cloner
gem 'nokogiri'
# arel-helpers: Useful tools to help construct database queries with ActiveRecord and Arel.
gem 'arel-helpers'

#
# Windows-only gems used by prosvc.  All are extension gems, so they must be have fixed version to match pre-compiled
# gems.
#

# Dependency of windows-api
# version pinned to pre-installed version in ruby/lib
gem 'win32-api', '1.5.2', :platform => 'mingw'
# Allow thin to run as a Windows service in thin_service_install.rb
# version pinned to pre-installed version in ruby/lib
gem 'win32-service', '0.7.2', :platform => 'mingw'
# Dependency of windows-pr
# version pinned to pre-installed version in ruby/lib
gem 'windows-api', '0.4.3', :platform => 'mingw'
# Allows using windows calls as methods instead of as procs
# version pinned to pre-installed version in ruby/lib
gem 'windows-pr', '1.2.4', :platform => 'mingw'

#
# Groups - listed alphabetically
#

group :assets do
  # CoffeeScript integration in rails
  gem 'coffee-rails', '~> 3.2.2'
  # We have compile errors with >=1.5.  These can probably be fixed and this line removed.
  gem 'coffee-script-source', '< 1.5'
  # Compass CSS library in rails
  gem 'compass-rails', '1.0.1'
  # Coffeescript client-side templates
  gem 'eco', '1.0.0'
  # CoffeeScript to JavaScript conversion
  gem 'execjs', '1.3.0'
  # Handlebars integration in rails
  gem 'handlebars_assets'
  gem 'hamlbars', '~> 2.0.1'
  # Sass integration in rails
  gem 'sass-rails', '~> 3.2.4'
  # JavaScript virtual machine for execjs
  gem 'therubyracer'
  # JavaScript minification
  gem 'uglifier', '>= 1.0.3'
end

# DO NOT add debuggers or other debugging gems to the Gemfile.  The various debuggers will interfere with each other.
# gem 'debugger' specifically interferes with the 'ruby-debug-ide' gem installed by Rubymine.  As a courtesy to other
# developers using different debuggers, install and require your debuggers as needed using plain gem install and
# manually requiring the debugger file OR modify the Gemfile, but DO NOT commit the change.
group :development do
  # replaces standard error page with interactive stack and REPL in each stack frame.
  gem 'better_errors', '~> 0.9.0'
  # enables REPL and local/instance variable inspection for better_errors
  gem 'binding_of_caller'
  # static analysis security scanner for Rails.  Used on Jenkins.
  gem 'brakeman'
  # configuration tweaks for Rails 3.1+
  gem 'rails-dev-tweaks', '~> 0.6.1'
  # markdown formatting for yard
  gem 'redcarpet'
  # generate API documentation
  gem 'yard'
  gem "yard-cucumber"
  gem 'yard-restful', '~> 1.2.3'
  gem "rails-erd", :git => "git://github.com/lsanchez-r7/rails-erd.git"
  gem 'pry'
end

group :development, :test do
  # automatically load factories
  gem 'factory_girl_rails'
  # Needs to be in development as well as test so that `rake spec` works.
  gem 'rspec-rails', '2.14.2'
  # teaspoon is a javascript test runner for Rails
  gem "teaspoon"
  # Adding in awesome_print for better console output
  # colorizes and formats rails console, it can be added to your ~/.irbrc
  # require "awesome_print"; AwesomePrint.irb!.
  gem 'awesome_print'
  # Foreman to manage all the process we are starting to use
  gem 'foreman'
  # Using faker for development and testing of the nexpose integration
  gem 'faker'
  gem 'parallel_tests'
end

group :test do
  # Rails integrations for cucumber
  gem 'cucumber-rails', :require => false
  # this displayes the currently running step.
  gem 'slowhandcuke'

  gem 'capybara', '~> 2.2.1'
  gem 'capybara-firebug', '~> 2.0.0'
  gem 'capybara-json', '~> 0.3.0'
  gem 'ci_reporter'
  gem 'database_cleaner', '~> 0.8.0'
  gem 'fivemat'
  gem 'headless'
  gem 'msgpack-rpc', '~> 0.5.2'
  gem 'rbvmomi', :git => 'git://github.com/rapid7/rbvmomi.git', :branch => 'patches-1.8.1'
  gem 'rspec_junit_formatter'
  gem 'selenium-webdriver', '~> 2.44'
  # add matchers from shoulda, such as validates_presence_of, which are useful for testing validations
  gem 'shoulda-matchers'
  gem 'simplecov', :github => "colszowka/simplecov", :ref => "88a649aec0", :require => false
  gem 'simplecov-rcov'
  gem 'timecop', '~> 0.7'
  gem 'spork'
  gem 'webrat'
end
需要“路径名”
#在生成过程中,临时移动GEM文件并
#我们必须手动定义项目根目录
如果环境['MSP_根']
root=Pathname.new(ENV['MSP_root'])
其他的
root=Pathname.new(_文件__).parent
结束
元模块\加载\路径=根。连接('metamodules','lib')。展开\路径到\路径
除非$LOAD_PATH.include?元模块加载路径
$LOAD\u PATH.unshift元模块\u LOAD\u PATH
结束
需要“metasploit/pro/metamodules”
来源'https://rubygems.org'
#所有宝石都按字母顺序在各自的组或部分中列出。添加宝石时,请在上面添加评论
#该声明解释了为什么要添加创业板。
#
#根
#
gempec路径:“ui”
gempec路径:“引擎”
gemspec名称:“metasploit框架已满”,路径:“msf3”
Metasploit::Pro::Metamodules.gemspecs(self)
#我们购买并使用RailsLT,它被分流到我们的构建过程中。
#RailsLTS需要这种公开提供的gem。
#请注意,单独安装此gem不会安装Railslt。
gem“railslts版本”,“>=3.2.21”
#CSS助手
宝石“指南针”
#使白名单上的rails路由在javasript中可用
创业板“js路线”
#linux上的延迟作业需要守护进程
gem'守护进程',:platforms=>:ruby
#用于从Ruby向javasript传递静态数据
宝石“gon”
#Jbuilder for Builder eque JSON模板
宝石“jbuilder”
#用户界面的Javascript框架
gem'jqueryrails',“~>3.1.1”
#分页
宝石“kaminari”,“~>0.14.0”
#Metasploit凭证模型
gem“metasploit凭证”,“~>0.14.5”
#Mdm模型
gem‘metasploit_数据_模型’,“~>0.24.0”
#文件的MIME类型标识
gem'mime-types','1.18',:git=>'git://github.com/rapid7/mime-types.git'
#从Rails 2向Rails 3添加不推荐的原型JS帮助程序
gem'prototype\u legacy\u helper','0.0.0',:git=>'git://github.com/jvennix-r7/prototype_legacy_helper.git'
#nexpose vuln验证所需的RestClient
gem“rest客户端”,“~>1.6.7”
#解析robot.txt文件以获取精简配置
gem“机器人”,“0.10.1”
#TODO:删除RSPEC!!!!!
#看https://jira.tor.rapid7.com/browse/MSP-10788
宝石'rspec'
#网络服务器
宝石“薄”
#邮件gem需要treetop,但由于某些原因,它并不合适
#省略开发和测试捆绑程序组时包含
宝石“树梢”
#
#metasploit框架中的pcap组
#
#PCAPRUB
gem'pcaprub',:git=>'git://github.com/bturner-r7/pcaprub.git',:branch=>rapid7'
#深入保护web标头和XSS防御
gem“安全头”
#
#扩展宝石。
#
#JSON解析
gem'json'
#用于控制器中API调用的RPC库
gem'msgpack'
#解析网页克隆器的HTML
宝石“nokogiri”
#arel助手:使用ActiveRecord和arel帮助构造数据库查询的有用工具。
宝石“阿雷尔助手”
#
#prosvc使用的仅限Windows的gems。所有这些都是扩展gem,所以它们必须有固定的版本来匹配预编译
#宝石。
#
#windowsapi的依赖性
#固定到ruby/lib中预装版本的版本
gem'win32api','1.5.2',:platform=>mingw'
#允许thin作为Windows服务在thin_service_install.rb中运行
#固定到ruby/lib中预装版本的版本
gem'win32 service','0.7.2',:platform=>mingw'
#windows pr的依赖性
#固定到ruby/lib中预装版本的版本
gem'windowsapi','0.4.3',:platform=>mingw'
#允许将windows调用用作方法而不是进程
#固定到ruby/lib中预装版本的版本
gem'windows pr','1.2.4',:platform=>mingw'
#
#组-按字母顺序列出
#
集团:资产做什么
#rails中的CoffeeScript集成
gem“咖啡轨”,“~>3.2.2”
#我们有编译错误>=1.5。这些可能是固定的,这一行删除。
gem“咖啡脚本源代码”,“<1.5”
#rails中的Compass CSS库
宝石“指南针轨道”,“1.0.1”
#Coffeescript客户端模板
gem“eco”,“1.0.0”
#CoffeeScript到JavaScript的转换
gem'execjs','1.3.0'
#扶手中的把手集成
gem“把手资产”
宝石“汉堡王”,“~>2.0.1”
#rails中的Sass集成
gem'sass-rails',“~>3.2.4”
#execjs的JavaScript虚拟机
宝石“therubyracer”
#JavaScript缩小
gem'uglifier','>=1.0.3'
结束
#不要将调试器或其他调试工具添加到GEM文件中。各种调试器将相互干扰。
#gem“debugger”专门干扰Rubymine安装的“ruby debug ide”gem。作为对他人的礼貌
#使用不同调试器的开发人员,根据需要使用普通gem安装和
#手动要求调试器文件或修改文件,但不提交更改。
小组:发展怎么办
#在每个堆栈帧中用交互式堆栈和REPL替换标准错误页。
gem“更好的错误”,“大于0.9.0”
#启用REPL和本地/实例变量检查以更好地检查\u错误
gem“绑定\u调用方的\u”
#Rails的静态分析安全扫描程序。用在詹金斯身上。
宝石“刹车手”
#Rails 3.1的配置调整+
gem'rails dev tweaks',“~>0.6.1”
#码的降价格式
宝石“红地毯”
#生成API文档
宝石“码”
宝石“庭院黄瓜”
宝石'yard restful',“~>1.2.3”
gem“rails-erd”,:git=>“git://github.com/lsanchez-r7/rails-erd.git"
宝石“窥探”
结束
小组:开发,:测试
#自动加载工厂
宝石“工厂女孩轨道”
#需要进行开发和测试,以便“rake spec”能够正常工作。
gem“rspec rails”、“2.14.2”
#teaspoon是Rails的javascript测试运行程序
宝石“茶匙”
#添加Aweasome_打印以获得更好的控制台输出
#对rails控制台进行着色和格式化,可以添加
gem 'pg', '~> 0.12.2'
sudo apt-get install libpq-dev
gem install pg
gem 'pg'
source 'https://rubygems.org'
group :development do
  gem 'capistrano'
  gem 'capistrano-ssh-doctor'
  gem 'capistrano-bundler'
  gem 'capistrano-passenger', '>= 0.1.1'
end