麻烦在OSX上运行指南针 - 在线[[51“]上的LoadError

时间:2013-08-22 06:58:01

标签: ruby sass rvm compass-sass

我之前在这里阅读了很多问题,遗憾的是,所描述的解决方案并非适用于我。我在OSX上并通过rvm使用ruby-1.9.3-p448。一切都刚刚建立起来。

然后我做sudo gem install compass获得指南针和sass。 没有错误消息。

stnwbr$ ruby -v
ruby 1.9.3p448 (2013-06-27 revision 41675) [x86_64-darwin12.4.0]

 stnwbr$ compass -v
 Compass 0.12.2 (Alnilam)

 stnwbr$ sass -v
 Sass 3.2.10 (Media Mark)

但是只要我执行compass createcompass watch之类的操作,我就会:

stnwbr$ compass create
LoadError on line ["51"] of /Users/stnwbr/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb: cannot load such file -- breakpoint
Run with --trace to see the full backtrace

包括--trace结果如下:

stnwbr$ compass create --trace
LoadError on line ["51"] of /Users/stnwbr/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb: cannot load such file -- breakpoint
  /Users/stnwbr/.rvm/rubies/ruby-1.9.3-p448/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_require.rb:51:in `require'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/data.rb:161:in `require'
  /Users/stnwbr/Dropbox/Projects/2013/11 OUA outdooradventures/OUA-sync/config.rb:1:in `get_binding'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:24:in `eval'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:24:in `parse_string'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:15:in `block in _parse'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `open'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/serialization.rb:14:in `_parse'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:7:in `block in new_from_file'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/inheritance.rb:204:in `with_defaults'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/file_data.rb:6:in `new_from_file'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:42:in `configuration_for'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/configuration/helpers.rb:97:in `add_project_configuration'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/project_base.rb:31:in `add_project_configuration'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/installer_command.rb:9:in `configure!'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/project_base.rb:15:in `initialize'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/commands/stamp_pattern.rb:69:in `initialize'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `new'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:42:in `perform!'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/lib/compass/exec/sub_command_ui.rb:15:in `run!'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/bin/compass:30:in `block in <top (required)>'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/bin/compass:44:in `call'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/gems/compass-0.12.2/bin/compass:44:in `<top (required)>'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/compass:23:in `load'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/compass:23:in `<main>'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `eval'
  /Users/stnwbr/.rvm/gems/ruby-1.9.3-p448/bin/ruby_noexec_wrapper:14:in `<main>'

不幸的是,这是我的理解停止的地方。所有想法都赞赏!谢谢。

2 个答案:

答案 0 :(得分:4)

卸载sass并使用以下命令重新安装:

gem uninstall sass
gem install sass

出于某种原因

gem install compass

带来了sass的一些前沿版本,导致了这个错误。

答案 1 :(得分:1)

  

然后我做了sudo gem install compass

<强> NEVER 曾经 使用SUDO 与rvm

按照link

中的说明操作