指南针没有发现奇异性

时间:2014-02-17 02:26:39

标签: gem gruntjs compass-sass singularitygs

罗盘框架无法加载/找到“奇点”。框架/延伸:

我通过RubyGem安装了软件包:

gem list compass && gem list singularity && gem list breakpoint

这给了我以下信息:

*** LOCAL GEMS ***

compass (1.0.0.alpha.18)
compass-core (1.0.0.alpha.17)
compass-import-once (1.0.2)

*** LOCAL GEMS ***

singularitygs (1.1.2)

*** LOCAL GEMS ***

breakpoint (2.4.1)

我的Gruntfile的任务compass:dev

compass:
  dev:
    options:
      trace: true
      require: ['singularitygs']
      sassDir: '<%= dir.sass %>'
      cssDir: '<%= dir.css %>'
      environment: 'development'

结果:

Running "compass:dev" (compass) task
LoadError on line 51 of /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb: no such file to load -- singularitygs
Run with --trace to see the full backtrace
Warning: ↑ Use --force to continue.

Aborted due to warnings.

接下来我尝试了一个config.rb文件:

compass:
  dev:
    options:
      trace: true
      config: 'config.rb'
      sassDir: '<%= dir.sass %>'
      cssDir: '<%= dir.css %>'
      environment: 'development'

具有以下内容:

require 'singularitygs'

这就是全部,结果如下:

Running "compass:dev" (compass) task
LoadError on line 51 of /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb: no such file to load -- singularitygs
  /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:51:in `require'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/data.rb:161:in `require'
  config.rb:1:in `get_binding'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:20:in `get_binding'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:23:in `parse_string'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:15:in `_parse'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `open'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `_parse'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:7:in `new_from_file'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/inheritance.rb:204:in `with_defaults'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:6:in `new_from_file'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:42:in `configuration_for'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:97:in `add_project_configuration'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:31:in `add_project_configuration'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:25:in `configure!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:15:in `initialize'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/update_project.rb:37:in `initialize'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `new'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `perform!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:30
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44:in `call'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44
  /usr/bin/compass:23:in `load'
  /usr/bin/compass:23
Warning: ↑ Use --force to continue.

Aborted due to warnings.

所以,我检查过,如果Compass在另一个目录中有该框架compass frameworks --trace

Available Frameworks & Patterns:

  * blueprint
    - blueprint/basic      - A basic blueprint install that mimics the actual blueprint css.
    - blueprint/buttons    - Button Plugin
    - blueprint/link_icons - Icons for common types of links
    - blueprint/project    - The blueprint framework.
    - blueprint/semantic   - The blueprint framework for use with semantic markup.
  * compass
    - compass/ellipsis     - Plugin for cross-browser ellipsis truncated text.
    - compass/extension    - Generate a compass extension.
    - compass/pie          - Integration with http://css3pie.com/
    - compass/project      - The default project layout.

如果我在compass frameworks --trace文件所在的根目录中执行相同的命令config.rb,我将收到同样的错误:

LoadError on line 51 of /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb: no such file to load -- singularitygs
  /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:51:in `require'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/data.rb:161:in `require'
  /Users/darius/Code/www/voidplus.de/www/config.rb:1:in `get_binding'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:20:in `get_binding'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:23:in `parse_string'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:15:in `_parse'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `open'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `_parse'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:7:in `new_from_file'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/inheritance.rb:204:in `with_defaults'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:6:in `new_from_file'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:42:in `configuration_for'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:97:in `add_project_configuration'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:31:in `add_project_configuration'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:25:in `configure!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/project_base.rb:15:in `initialize'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/commands/list_frameworks.rb:7:in `initialize'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `new'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `perform!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:30
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44:in `call'
  /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:44
  /usr/bin/compass:23:in `load'
  /usr/bin/compass:23

我不知道,我可以尝试解决这个问题。另外,我卸载并安装所有gem文件但没有成功。也许这是错误的宝石环境gem env

 - RUBYGEMS VERSION: 2.2.2
  - RUBY VERSION: 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.4.0]
  - INSTALLATION DIRECTORY: /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/gems/2.0.0
  - RUBY EXECUTABLE: /usr/local/Cellar/ruby/2.0.0-p247/bin/ruby
  - EXECUTABLE DIRECTORY: /usr/local/Cellar/ruby/2.0.0-p247/bin

感谢您的帮助和提示, 大流士

2 个答案:

答案 0 :(得分:2)

Singularity 1.1.2与Compass 1.0.0不兼容。我们有一个预发布版本的Singularity 1.2.0,但是。

Gem兼容性问题正是我们recommend using Bundler管理gem版本的原因。如果您想在Compass 1.0.0中使用Singularity,请执行以下操作:

  1. (sudo) gem install bundler
  2. 在项目的根目录下创建一个文件Gemfile并添加以下内容:

    source 'http://rubygems.org'
    gem 'singularitygs', '~>1.2.0.rc.6'
    
  3. 运行bundle install --path vendor

  4. 忽略版本控制系统中的vendor目录(如果使用Git,请将./vendor添加到.gitignore文件中)
  5. bundleExec: true添加到您的compass:dev 咕噜声任务

答案 1 :(得分:0)

我通过2.0.0将Ruby从1.9.3降级为rbenv,这解决了问题。