这就是我正在使用的:Windows 8. Cygwin32。Rvm 版本 1.25.27。红宝石版本 2.1.2p95。宝石版本 2.3.0。Drush 5.9 版。
我对这一切完全陌生,所以解释很可能非常简单。
我尝试使用我的 drupal 主题文件夹中的“drush omega-guard”,但收到一条错误消息,提示我必须安装 Bundler 1.2 或更高版本。这一切都很好,因为我没有安装捆绑包。但是当我尝试使用命令“bundle install”时,我得到了这个:
$ bundle install
-bash: bundle: kommandot finns inte
(Kommandot finns inte = Command not found。)当我尝试使用“gem bundler install”时,我得到了这个:
$ gem bundler install
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command bundler
我还尝试了“gem bundle install”:
$ gem bundle install
ERROR: While executing gem ... (Gem::CommandLineError)
Unknown command bundle
所以我使用“哪个捆绑包”,然后使用 cd 进入该文件夹。
$ which bundle
/home/I/.rvm/gems/ruby-2.1.2/bin/bundle
我再次尝试了相同的命令,但来自另一个文件夹,结果如下:
I@I ~/.rvm/gems/ruby-2.1.2/bin
$ gem install bundler
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
I@I ~/.rvm/gems/ruby-2.1.2/bin
$ gem install bundle
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
I@I ~/.rvm/gems/ruby-2.1.2/bin
$ bundle install
/home/I/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'bundler' (>= 0) among 13 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/home/I/.rvm/gems/ruby-2.1.2:/home/I/.rvm/gems/ruby-2.1.2@global', execute `gem env` for more information
from /home/I/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/dependency.rb:322:in `to_spec'
from /home/I/.rvm/rubies/ruby-2.1.2/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_gem.rb:53:in `gem'
from /home/I/.rvm/gems/ruby-2.1.2/bin/bundle:22:in `<main>'
当我使用命令“gem list”时,未列出捆绑包:
$ gem list
*** LOCAL GEMS ***
bigdecimal (1.2.5, 1.2.4)
io-console (0.4.2)
json (1.8.1)
minitest (5.3.5, 4.7.5)
psych (2.0.5)
rake (10.3.2, 10.1.0)
rdoc (4.1.1, 4.1.0)
test-unit (2.5.5, 2.1.2.0)
我错过了什么或做错了什么?我一直在关注本教程,到目前为止一切正常:https ://www.youtube.com/watch?v=XF_LaSfua8Y&index=10&list=PLLnpHn493BHH5nnK2dKE_42l1oXA6Tq6H
编辑:因为我问了这个问题,所以我尝试重新安装 ruby 2.1.2。安装卡在“#importing gemset”上,大约 36 小时后,我的电脑因停电而关闭。因此,我不知道重新安装是否完成。之后,我还将 gem 版本更改为 2.1.2 以匹配 ruby 版本。这些东西似乎有帮助,之后我可以同时运行“gem install bundler”和“bundle install”。我的宝石列表现在看起来像这样:
$ gem list
*** LOCAL GEMS ***
addressable (2.3.6)
bigdecimal (1.2.5, 1.2.4)
breakpoint (2.0.7)
bundle (0.0.1)
bundler (1.6.3)
celluloid (0.15.2)
chunky_png (1.3.1)
coderay (1.1.0)
color-schemer (0.2.8)
compass (0.12.6)
compass-blend-modes (0.0.2)
compass-normalize (1.5)
compass-rgbapng (0.2.1)
compass-validator (3.0.1)
css_parser (1.3.5)
dash (0.4.0)
fssm (0.2.10)
io-console (0.4.2)
json (1.8.1)
minitest (5.3.5, 4.7.5)
psych (2.0.5)
rake (10.3.2, 10.1.0)
rdoc (4.1.1, 4.1.0)
sass (3.2.19)
test-unit (2.5.5, 2.1.2.0)
timers (1.1.0)
但是当我尝试运行“drush omega-guard”时出现了一个新问题:
$ drush omega-guard
Which theme do you want to run Guard for?
[0] : Cancel
[1] : Ohm (Subtheme of Omega) - Omega based demonstration theme. Serves as a
best-practice reference for the Omega documentation. Ohm will be
constantly updated as best practice evolves so shouldn't be used in
production.
[2] : Omega - A powerful HTML5 base theme framework utilizing tools like
Sass, Compass, Grunt, Bower, Ruby Version Manager, Bundler and more.
[3] : Design (Subtheme of Omega) - Please provide a description for
your theme.
3
There was a problem with your setup: [error]
Resolving dependencies...
Bundler can't satisfy your Gemfile's dependencies.
Install missing gems with `bundle install`.
所以我再次尝试使用命令“bundle install”,但最终得到一个无休止的错误消息:
$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable 2.3.6
Using chunky_png 1.3.1
Using fssm 0.2.10
Using sass 3.2.19
Using compass 0.12.6
Using breakpoint 2.0.7
Using timers 1.1.0
Using celluloid 0.15.2
Using coderay 1.1.0
Using compass-blend-modes 0.0.2
Using color-schemer 0.2.8
Using compass-normalize 1.5
Using compass-rgbapng 0.2.1
Using compass-validator 3.0.1
Using css_parser 1.3.5
0 [main] ruby 15100 child_info_fork::abort: address space needed by 'fcntl.so' (0x620000) is already occupied
0 [main] ruby 11364 child_info_fork::abort: address space needed by 'fcntl.so' (0x620000) is already occupied
1 [main] ruby 14584 child_info_fork::abort: address space needed by 'fcntl.so' (0x620000) is already occupied
最后三行不断重复,但数字不同。那么这次有什么问题呢?