我無法使用我的Rails應用程序獲取pg gem。已安裝Gem,但未找到捆綁顯示
當我用sudo的包安裝,我得到:
Using rake (10.0.4)
Using i18n (0.6.4)
Using multi_json (1.7.2)
Using activesupport (3.2.8)
Using builder (3.0.4)
Using activemodel (3.2.8)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.5)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.6)
Using sprockets (2.1.3)
Using actionpack (3.2.8)
Using mime-types (1.22)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.8)
Using arel (3.0.2)
Using tzinfo (0.3.37)
Using activerecord (3.2.8)
Using activeresource (3.2.8)
Using coffee-script-source (1.6.2)
Using execjs (1.4.0)
Using coffee-script (2.2.0)
Using rack-ssl (1.3.3)
Using json (1.7.7)
Using rdoc (3.12.2)
Using thor (0.18.1)
Using railties (3.2.8)
Using coffee-rails (3.2.2)
Using jquery-rails (2.2.1)
Using pg (0.15.0)
Using bundler (1.1.5)
Using rails (3.2.8)
Using sass (3.2.7)
Using sass-rails (3.2.6)
Using uglifier (1.3.0)
然而,當我對任何寶石做一個「包秀」,我得到:
Could not find pg-0.15.0 in any of the sources
此外,當我做任何耙指令,我得到:
/usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/spec_set.rb:90:in `block in materialize': Could not find pg-0.15.0 in any of the sources (Bundler::GemNotFound)
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `map!'
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/spec_set.rb:83:in `materialize'
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/definition.rb:127:in `specs'
from /usr/local/rvm/gems/[email protected]/gems/bundler-1.1.5/lib/bundler/environment.rb:27:in `specs'
from /usr/local/rvm/gems/[email protected]/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:41:in `candidate?'
from /usr/local/rvm/gems/[email protected]/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:60:in `setup'
from /usr/local/rvm/gems/[email protected]/gems/rubygems-bundler-1.0.6/lib/rubygems-bundler/noexec.rb:75:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from /usr/local/rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:9:in `<main>'
我懷疑它與RVM和我使用的是哪個版本的Ruby有關我最近改爲1.9.3。有任何想法嗎?
你使用的是基於用戶的rvm還是普通的rvm?還是沒有rvm? – Mohanraj
我不知道基於用戶的RVM和普通RVM之間有什麼區別。但是,是的,我正在使用RVM。 – Ridwan
基於用戶的RVM => ruby和所有gem都安裝在您的主目錄中,名爲.rvm。但是在常見的rvm ruby和安裝在/ usr/local/rvm中的所有gem中,它可能會因系統而異。 – Mohanraj