2012-05-15 146 views
8

在Ubuntu 11.10中,我是一个开心又无忧无虑的罗盘用户。我升级到12.04,并得到了这个问题:Compass (ruby) encoding error无法通过rvm安装指南针

我以某种方式设法解决它在我的一台电脑上通过rvm安装红宝石,但现在我得到另一个错误,在我的另一台计算机(它有相同的初始问题)。我安装红宝石和罗盘,并使用全球宝石为默认:

gem list 

*** LOCAL GEMS *** 

bundler (1.1.3) 
chunky_png (1.2.5) 
compass (0.12.1) 
fssm (0.2.9) 
rake (0.9.2.2) 
rubygems-bundler (1.0.0) 
rvm (1.11.3.3) 
sass (3.1.18) 

但是当我尝试用指南针做任何事情,我得到这个错误:

compass 
/home/mrpotato/.rvm/gems/[email protected]/gems/bundler-1.1.3/lib/bundler/shared_helpers.rb:22:in `default_gemfile': Could not locate Gemfile (Bundler::GemfileNotFound) 
    from /home/mrpotato/.rvm/gems/[email protected]/gems/bundler-1.1.3/lib/bundler.rb:213:in `default_gemfile' 
    from /home/mrpotato/.rvm/gems/[email protected]/gems/bundler-1.1.3/lib/bundler.rb:164:in `root' 
    from /home/mrpotato/.rvm/gems/[email protected]/gems/bundler-1.1.3/lib/bundler.rb:123:in `load' 
    from /home/mrpotato/.rvm/gems/[email protected]/gems/bundler-1.1.3/lib/bundler.rb:114:in `setup' 
    from /home/mrpotato/.rvm/gems/[email protected]/gems/bundler-1.1.3/lib/bundler.rb:119:in `require' 
    from /home/mrpotato/.rvm/gems/[email protected]/gems/compass-0.12.1/bin/compass:25:in `<top (required)>' 
    from /home/mrpotato/.rvm/gems/[email protected]/bin/compass:19:in `load' 
    from /home/mrpotato/.rvm/gems/[email protected]/bin/compass:19:in `<main>' 
    from /home/mrpotato/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `eval' 
    from /home/mrpotato/.rvm/gems/[email protected]/bin/ruby_noexec_wrapper:14:in `<main>' 

感谢您的帮助。

回答

14

这似乎是刚刚发布的新版本rubygems-bundler的问题。安装以前的版本(gem install -v 0.9.2 rubygems-bundler)为我解决了它。

编辑:我也跑rubygems-bundler-uninstaller这可能是修复的真正来源。

+8

'RubyGems的打捆-uninstaller'是解决那里:) – Cmorales

+0

这是**指南针的错误**,我已经在这里固定它https://github.com/chriseppstein/compass/拉/ 894 - 等待它被合并,这只是暂时的解决方案。 – mpapis

+4

确认运行'rubygems-bundler-uninstaller'也适用于我。 –

3

试图与山狮的Mac上安装北斗/ SASS/RVM当我今天就遇到了这个问题。

我不能让RubyGems的打捆机,卸载程序运行/卸载,所以我必须做到以下几点:

  1. 切换到RVM全球宝石和卸载RubyGems的打捆 RVM红宝石1.9 0.3-P194 @全球再宝石的rubygems卸载打捆

  2. 再切换回我的其他宝石 - RVM红宝石1.9.3-P194,现在正在工作的罗盘或青菜或任何宝石作品

不知道这是否是正确的做事方式,但它对我有效。希望能帮助别人。

1

如果您正在使用yeoman构建恰好想要使用指南针的基于节点的应用程序,则可以禁用这些类型的应用程序的Gemfile要求。

只是这行添加到您的~/.bash_profile

export NOEXEC_EXCLUDE="compass" 

运行source ~/.bash_profile,并再次尝试。我在yeoman生成的角度项目(不需要Gemfile)上运行grunt server时遇到此问题。

https://github.com/mpapis/rubygems-bundler#disabling-executables