找不到 gem 安装了捆绑器
Could not find gem installed with bundler
对于我的 PHP Symfony 应用程序,我需要 Compass 和 Sass。两者都应该安装在我的项目的 vendor/bundle
文件夹中。
这是我目前所做的:
$ gem install bundler
Successfully installed bundler-1.10.6
1 gem installed
$ bundle install --path vendor/bundle
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
// ... Installing some gems
Using bundler 1.10.6
Bundle complete! 2 Gemfile dependencies, 10 gems now installed.
Bundled gems are installed into ./vendor/bundle.
好了,现在轮到我的问题了。当我执行已安装的 gems 之一时,出现以下错误:
$ vendor/bundle/ruby/1.9.1/bin/compass
/usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:315:in `to_specs': Could not find 'compass' (>= 0) among 30 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-1.9.3-p551:/usr/local/rvm/gems/ruby-1.9.3-p551@global', execute `gem env` for more information
from /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:324:in `to_spec'
from /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from vendor/bundle/ruby/1.9.1/bin/compass:22:in `<main>'
我知道它在 $GEM_PATH 中查找,但当然找不到。但是我该如何解决这个问题呢?我不想更改项目文件夹的 gem 路径。
与Bundle you should launch the application with the Bundle Exec command。对于发射罗盘,你可以这样做,例如:
$ bundle exec compass watch
或
$ bundle exec compass compile
检查 this nice article 了解更多信息。
希望对您有所帮助
对于我的 PHP Symfony 应用程序,我需要 Compass 和 Sass。两者都应该安装在我的项目的 vendor/bundle
文件夹中。
这是我目前所做的:
$ gem install bundler
Successfully installed bundler-1.10.6
1 gem installed
$ bundle install --path vendor/bundle
Fetching gem metadata from https://rubygems.org/...........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
// ... Installing some gems
Using bundler 1.10.6
Bundle complete! 2 Gemfile dependencies, 10 gems now installed.
Bundled gems are installed into ./vendor/bundle.
好了,现在轮到我的问题了。当我执行已安装的 gems 之一时,出现以下错误:
$ vendor/bundle/ruby/1.9.1/bin/compass
/usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:315:in `to_specs': Could not find 'compass' (>= 0) among 30 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-1.9.3-p551:/usr/local/rvm/gems/ruby-1.9.3-p551@global', execute `gem env` for more information
from /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:324:in `to_spec'
from /usr/local/rvm/rubies/ruby-1.9.3-p551/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from vendor/bundle/ruby/1.9.1/bin/compass:22:in `<main>'
我知道它在 $GEM_PATH 中查找,但当然找不到。但是我该如何解决这个问题呢?我不想更改项目文件夹的 gem 路径。
与Bundle you should launch the application with the Bundle Exec command。对于发射罗盘,你可以这样做,例如:
$ bundle exec compass watch
或
$ bundle exec compass compile
检查 this nice article 了解更多信息。
希望对您有所帮助