我尝试使用的每个宝石都有问题。
我正在使用Ubuntu机器。
错误是
/usr/local/lib/ruby/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/spec_set.rb:95:in `block in materialize': Could not find chunky_png-1.3.6 in any of the sources (Bundler::GemNotFound)
该错误不是特定于该gem,因为它也发生在不同的gem上。我认为这是一个路径问题。
我已经尝试重新安装ruby。任何帮助将非常感激。
我的环境:
$ ruby -v
ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-linux]
$ bundle env
Bundler 1.12.5
Rubygems 2.6.6
Ruby 2.1.10p492 (2016-04-01 revision 54464) [x86_64-linux]
GEM_HOME /usr/local/bundle
GEM_PATH
Git 2.1.4
$ gem environment
- RUBYGEMS VERSION: 2.6.6
- RUBY VERSION: 2.1.10 (2016-04-01 patchlevel 492) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/bundle
- USER INSTALLATION DIRECTORY: /root/.gem/ruby/2.1.0
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bundle/bin
- SPEC CACHE DIRECTORY: /root/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/bundle
- /root/.gem/ruby/2.1.0
- /usr/local/lib/ruby/gems/2.1.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- "install" => "--no-document"
- "update" => "--no-document"
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bundle/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
宝石清单
*** LOCAL GEMS ***
bigdecimal (default: 1.2.4)
bundler (1.12.5)
chunky_png (1.3.6)
compass (1.0.3)
compass-core (1.0.3)
compass-import-once (1.0.5)
ffi (1.9.14)
io-console (default: 0.4.3)
json (default: 1.8.1)
minitest (default: 4.7.5)
multi_json (1.12.1)
psych (default: 2.0.5)
rake (default: 10.1.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
rdoc (default: 4.1.0)
rubygems-update (2.6.6)
sass (3.4.22)
test-unit (default: 2.1.10.0)
我找到了一个解决方案来安装没有sudo
的宝石。在我的机器上似乎有两个宝石的位置,当我通过sudo安装时,它将它们放在错误的位置。例如,使用gem install compass
进行安装将其放置在正确的位置。