I was a happy and worries-free user of compass in Ubuntu 11.10. I upgraded to 12.04 and got this problem: Compass (ruby) encoding error
I somehow managed to solve it installing ruby via rvm on one of my computers but now I get a different error in my other computer (which had the same initial problem). I install ruby and compass and use the global gemset as default:
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)
But when I try to do anything with compass, I get this error:
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>'
Thanks for your help.
It appears to be a problem with the new version of rubygems-bundler that was just released. Installing the previous version (gem install -v 0.9.2 rubygems-bundler
) fixed it for me.
Edit: I also ran rubygems-bundler-uninstaller
which may have been the real source of the fix.
I ran into this problem today when trying to install Compass/SASS/RVM on a mac with Mountain Lion.
I couldn't get rubygems-bundler-uninstaller to run/uninstall, so I had to do the following:
Switch to the rvm global gemset and uninstall rubygems-bundler rvm ruby-1.9.3-p194@global then gem uninstall rubygems-bundler
Then switch back to my other gemset - rvm ruby-1.9.3-p194 and now running compass or sass or whatever gem works
Not sure if it is the correct way of doing things, but it worked for me. Hope that helps someone.
it's a bug in compass it assumes that existence of Bundler
means Bundler.setup
was called.
Here are the lines that break it https://github.com/chriseppstein/compass/blob/stable/bin/compass#L24-L26:
24 if defined?(Bundler)
25 Bundler.require :assets
26 end
If you're using yeoman for building a node-based app that just happens to want to use compass, you can disable the Gemfile requirement for these types of apps.
Just add this line to your ~/.bash_profile
:
export NOEXEC_EXCLUDE="compass"
Run source ~/.bash_profile
and try it again. I was having this issue when running grunt server
on a yeoman-generated angular project (which doesn't need a Gemfile).
https://github.com/mpapis/rubygems-bundler#disabling-executables
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With