繁体   English   中英

无法通过RVM安装指南针

[英]Can't install compass via rvm

在Ubuntu 11.10中,我是指南针的快乐和无忧用户。 我升级到12.04并遇到此问题: 指南针(红宝石)编码错误

我以某种方式设法解决了该问题,并通过rvm在其中一台计算机上安装了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 `<top (required)>'
    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 `<main>'
    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 `<main>'

谢谢你的帮助。

刚发布的新版本的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卸载rubygems-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生成的angular项目(不需要Gemfile)上运行grunt server时遇到了这个问题。

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM