无法通过rvm安装指南针

在Ubuntu 11.10中,我是一个快乐且无忧无虑的指南针用户。 我升级到12.04并遇到了这个问题: Compass(ruby)编码错误

我以某种方式设法解决了它在我的一台计算机上通过rvm安装ruby但现在我的另一台计算机出现了一个不同的错误(它有同样的初始问题)。 我安装ruby和指南针并使用全局gemset作为默认值:

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/ruby-1.9.3-p194@global/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/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:213:in `default_gemfile' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:164:in `root' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:123:in `load' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:114:in `setup' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/gems/compass-0.12.1/bin/compass:25:in `' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/bin/compass:19:in `load' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/bin/compass:19:in `' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/bin/ruby_noexec_wrapper:14:in `eval' from /home/mrpotato/.rvm/gems/ruby-1.9.3-p194@global/bin/ruby_noexec_wrapper:14:in `' 

谢谢你的帮助。

刚刚发布的新版rubygems-bundler似乎存在问题。 安装以前的版本( gem install -v 0.9.2 rubygems-bundler )为我修复了它。

编辑:我还运行了rubygems-bundler-uninstaller ,这可能是修复的真正来源。

今天我试图在与Mountain Lion的Mac上安装Compass / SASS / RVM时遇到了这个问题。

我无法使用rubygems-bundler-uninstaller来运行/卸载,所以我必须执行以下操作:

  1. 切换到rvm global gemset并卸载rubygems-bundler rvm ruby​​-1.9.3-p194@global然后gem uninstall ruby​​gems-bundler

  2. 然后切换回我的另一个gemset – rvm ruby​​-1.9.3-p194,现在运行指南针或sass或任何gem工作

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

这是罗盘中的一个错误,它假设Bundler存在意味着Bundler.setup

以下是打破它的行https://github.com/chriseppstein/compass/blob/stable/bin/compass#L24-L26 :

 24 if defined?(Bundler) 25 Bundler.require :assets 26 end 

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

只需将此行添加到~/.bash_profile

 export NOEXEC_EXCLUDE="compass" 

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

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