如何解决错误'执行gem ...(TypeError)时无法将nil转换为String'?

时间:2014-08-28 07:27:52

标签: ruby windows drupal gem

我正在使用Windows 8和cygwin。我正在尝试配置Omega4 Drupal主题。

我有ruby版本1.9.3p547(2014-05-14修订版45962)[x86_64-cygwin]

我已经从https://rubygems.org/安装了ruby gems版本2.4.1,如运行gem -v命令时所示:

$ gem -v
2.4.1

我在文件夹c:\ xampp \ htdocs \ drupal中安装了Drupal,cygwin可以通过cygdrive访问。

我导航到我的subtheme的文件夹,然后像这样运行命令:

$ drush omega-guard

which: no tput in (/home/prem/.rvm/gems/ruby-1.9.3-p547@omega.furniure/bin:/home/               prem/.rvm/gems/ruby-1.9.3-p547@global/bin:/home/prem/.rvm/rubies/ruby-1.9.3-p547                                                /bin:/home/prem/.rvm/bin:/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/Intel/iCLS Client:/cygdrive/c/Program Files/Intel/iCLS Client:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/Intel/OpenCL SDK/3.0/bin/x86:/cygdrive/c/Program Files (x86)/Intel/OpenCL SDK/3.0/bin/x64:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/cygdrive/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/cygdrive/c/Program Files/Java/jre7/bin:/cygdrive/c/Ruby200-x64/bin:/cygdrive/c/Ruby193/bin:       /cygdrive/c/ProgramData/Drush:/cygdrive/c/Program Files (x86)/Drush/GnuWin32/bin:/cygdrive/c/Program Files (x86)/Drush/Php:/cygdrive/c/Program Files (x86)/Drush/cwRsync/bin:/cygdrive/c/xampp/php)
Which theme do you want to run Guard for?
 [0]  :  Cancel
 [1]  :  furniure (Subtheme of Omega) - Please provide a description for your
         theme.
 [2]  :  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.
 [3]  :  Omega - A powerful HTML5 base theme framework utilizing tools like
         Sass, Compass, Grunt, Bower, Ruby Version Manager, Bundler and more.
1
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
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable 2.3.6

TypeError: can't convert nil into String
An error occurred while installing sass (3.4.1), and Bundler cannot continue.
Make sure that `gem install sass -v '3.4.1'` succeeds before bundling.

$ gem install sass -v 3.4.1

ERROR:  While executing gem ... (TypeError)
    can't convert nil into String

所以我的问题是关于上述错误While executing gem ... (TypeError) can't convert nil into String:我该如何解决此错误?

0 个答案:

没有答案