无法安装捆绑包 - 无尽的错误消息

时间:2014-06-30 14:29:43

标签: bundle bundler drush

这就是我正在使用的:Windows 8. Cygwin32。 Rvm版本1.25.27。 Ruby版本2.1.2p95。宝石版本2.3.0。 Drush版本5.9。

我对这一切都是全新的,所以解释非常简单。

我试图使用" drush omega-guard"从我的drupal主题文件夹,但得到一个错误说我必须安装Bundler版本1.2或更新。这一切都很好,因为我没有安装捆绑。但是当我尝试使用命令" bundle install"我明白了:

    $ bundle install
-bash: bundle: kommandot finns inte

(Kommandot finns inte =未找到命令。) 当我尝试使用" gem bundler install"我明白了:

 $ gem bundler install
ERROR:  While executing gem ... (Gem::CommandLineError)
    Unknown command bundler

我也尝试了#gem; 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>'

当我使用命令&#34; gem list&#34;捆绑未列出:

$ 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。安装停留在&#34; #importing gemset&#34;大约36个小时后,我的电脑由于停电而被关闭。因此,我不知道重新安装是否已完成。之后我还将我的宝石版本更改为2.1.2以匹配ruby版本。 Theese似乎有所帮助,之后我可以同时运行&#34; gem install bundler&#34;和#34;捆绑安装&#34;。我的gemlist现在看起来像这样:

$ 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)

但是当我尝试跑步时会出现一个新问题&#34; drush omega-guard&#34;:

$ 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`.

所以我尝试使用命令&#34; bundle install&#34;再次,但最终得到一个无休止的错误信息:

$ 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

最后三行不断重复,但数字不同。那么这次问题是什么?

1 个答案:

答案 0 :(得分:0)

Drush是一个PHP应用程序,而不是Ruby应用程序。

你需要一个PHP工作环境(起初是一个PHP cli)才能使用drush。