I would like to install compass through the terminal in mac. I installed sass. I now have Sass 3.3.0.alpha.175 (Bleeding Edge)
Then I tried to install compass with
sudo gem install compass
It gave me this warning
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/rdoc.rb:280: warning: conflicting chdir during another chdir block
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rdoc/rdoc.rb:287: warning: conflicting chdir during another chdir block
then stated the "1 gem installed"
When I run compass, it does not work, it gives me these lines:
/Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:110:in `gem_original_require': no such file to load -- sass/script/node (LoadError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:110:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches/browser_support.rb:1
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:2
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1:in `each'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions/monkey_patches.rb:1
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass/sass_extensions.rb:9
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass.rb:5
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass.rb:4:in `each'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/lib/compass.rb:4
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:20
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:8:in `fallback_load_path'
from /Library/Ruby/Gems/1.8/gems/compass-0.12.2/bin/compass:19
from /usr/bin/compass:23:in `load'
from /usr/bin/compass:23
Is there a way to fix this?
Up to now I used codekit. But I would like to take advantage of sourcemaps and I believe the terminal is the only way to do it. I tried watching sass along with source maps and the result is beautiful (in that I could use chrome as an editor). But I'd like to add compass in there as well.
Is there a way to get this working?
I am using os version 10.8.3
Compass is not compatible with sass 3.3.0 alpha (see gem doc). You should uninstall compass and sass, and the reinstall using sudo gem install compass which will install sass as well (with the right version).
EDIT:
Just tried to install compass with rvm today (26 Feb 2017) and stumbled upon another error: Error compiling Compass LoadError on line [“179”] .. data.rb: Cannot load such file. This answer worked for me.
For what it's worth, if you're using RVM, then don't use sudo. Here's how I solved this problem (and I got here using Alexandre's answer):
1) $ gem uninstall sass
(say yes to prompts alerting you about dependancies, you're about to reinstall anyway)
2) $ gem install sass -v 3.2.10
after that, compass is working great
in my solution: I have installed ruby.
brew install ruby (I know already installed with mac) then
sudo gem install compass
Related
on a mac os 10.12.6 after i try sudo gem install rake or
i get this error message:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rubygems/core_ext/kernel_warn (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.0.0/rubygems.rb:1395:in `<top (required)>'
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'
The is error throws any gem install
Ruby version is 2.0.0, Ive tried updating ruby with homebrew but whni try installing home brew i get the same error.
Cant seem to edit /Library/Ruby/Site/2.0.0/rubygems.rb:1395
This is possibly related to issue #2535 in rubygems fixed in release 3.0.1.
Try gem update --system
All suggested solutions didn't fully work for me, although gem update --system seems to be a good idea, because it updates ruby. BUT: On my Mac, the system version didn't step back after the update, although ruby -v gave the correct new version. The described error remained for me, e.g. while using homebrew with brew update:
$ brew update
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- rubygems/core_ext/kernel_warn (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Library/Ruby/Site/2.3.0/rubygems.rb:1395:in `<top (required)>'
from <internal:gem_prelude>:4:in `require'
from <internal:gem_prelude>:4:in `<internal:gem_prelude>'
The only thing that helped me was the following as described here:
sudo rm -f '/usr/local/bin/update_rubygems'
sudo rm -rf '/Library/Ruby/Site/2.3.0'
Hope to help some folks (I'am on MacOS 10.14.2).
You are going to have problems using system ruby or messing with it's gems. You are far better off to use a ruby version manager where you may have different versions of ruby per project. I highly recommend RVM.
See here for how to install
Did you also try to run gem install bundler?
Post output of these commands if they don't give you an error
ruby -v
which ruby
gem env
I can install charlock_holmes gem on opensuse, trying to open it up in irb quickly, I get this:
> irb
2.3.0 :001 > require 'charlock_holmes'
LoadError: /home/wpostma/.rvm/gems/ruby-2.3.0/gems/charlock_holmes-0.7.3/lib/charlock_holmes/charlock_holmes.so:
undefined symbol: _ZTIN6icu_538ByteSinkE - /home/wpostma/.rvm/gems/ruby-2.3.0/gems/charlock_holmes-0.7.3/lib/charlock_holmes/charlock_holmes.so
from /home/wpostma/.rvm/rubies/ruby-2.3.0/lib64/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/wpostma/.rvm/rubies/ruby-2.3.0/lib64/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/wpostma/.rvm/gems/ruby-2.3.0/gems/charlock_holmes-0.7.3/lib/charlock_holmes.rb:1:in `<top (required)>'
from /home/wpostma/.rvm/rubies/ruby-2.3.0/lib64/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
from /home/wpostma/.rvm/rubies/ruby-2.3.0/lib64/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
from /home/wpostma/.rvm/rubies/ruby-2.3.0/lib64/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from (irb):1
from /home/wpostma/.rvm/rubies/ruby-2.3.0/bin/irb:11:in `<main>'
2.3.0 :002 >
It looks to me like maybe something in charlock_holmes is incompatible with the libicu version inside tumbleweed.
I'm using ruby installed with rvm, and purging all my gemsets and reinstalling does not fix it. Any other ways to get charlock_holmes to work? Maybe I need to install a special copy of libicu (earlier, older) and point the gem at it?
Either of these works. For me the bundle config option works better.
This is a direct command to install the gem, directing it towards the correct libicu version:
gem install charlock_holmes -- --with-icu-dir=/usr/local
This is a command to tell which ever ruby project I install later on this system, will get gems installed by bundler to just work instead of breaking:
bundle config build.charlock_holmes "--with-icu-dir=/usr/local" --global
Since I'm using rvm the above bundle configuration seems to be "global" to that rvm environment only.
In my case, the bundle config is helpful as a large series of actions that would have otherwise failed (installing gems, and bootstrapping a large rails application) just worked.
This was working fine and then suddenly it wasn't. I wish i knew why. Really stuck and cannot find anything online. I'm working on an ObjectiveC project. I've tried reseting everything with:
$ sudo gem uninstall ruby
$ sudo gem uninstall cocoapods
then
$ sudo gem install ruby
$ sudo gem install cocoapods
$ sudo gem update ruby
$ sudo gem update cocoapods
then i when in my projects directory i run
$pod install
and get the following error. I get this on all projects.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `require': cannot load such file -- cocoapods-core (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:110:in `rescue in require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:35:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:8:in `<module:Pod>'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/lib/cocoapods.rb:4:in `<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require'
from /Library/Ruby/Gems/2.0.0/gems/cocoapods-0.29.0/bin/pod:23:in `<top (required)>'
from /usr/bin/pod:23:in `load'
from /usr/bin/pod:23:in `<main>'
Any ideas/clues/answers would be very appreciated.
I reinstalled cocoa pods by running
$ sudo gem uninstall cocoapods-core cocoapods-downloader cocoapods
$ sudo gem install cocoapods
That resolved the issue for me
Looks like you're missing one of CocoaPod's dependencies. You should be able to install it with:
[sudo] gem install cocoapods-core
You should stop using "sudo" for tasks such as "gem install" etc. Here is a little tutorial on how to fix your ruby to ensure that you are not going to see issues with permissions for cocoapods (and other gems):
Can't get to work CocoaPods and Yosemite
Any ideas on this error - the sass compilejust fails - have tried gem update --system and gem update and remove and reinstall sass gem
sudo sass --update --trace styles.scss overwrite styles.css
Password:
/Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin/staleness_checker.rb:27: uninitialized constant Sass::Plugin::StalenessChecker::Mutex (NameError)
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin/compiler.rb:7
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/plugin.rb:4
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/core_ext/kernel_require.rb:53:in `require'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:381:in `watch_or_update'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:326:in `process_result'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:41:in `parse'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/../lib/sass/../sass/exec.rb:21:in `parse!'
from /Library/Ruby/Gems/1.8/gems/sass-3.2.11/bin/sass:9
from /usr/bin/sass:23:in `load'
from /usr/bin/sass:23
This same issue started popping up for me today. I suppose there is something wrong with sass-3.2.11 or some configuration that I am not aware of.
To get past the issue for now I uninstalled the new version and installed an older version like so:
Uninstall sass
gem uninstall sass
Install version 3.2.10
gem install sass --version 3.2.10
Reinstall compass
gem install compass
This has been fixed in sass 3.2.12.
Sass Issue Queue
So all you need to do is update your sass gem
gem install sass
Should pull the latest version 3.2.12 or greater
i previously had updated the default OSX version with:
gem update --system
This created the problem - not a good idea to do on the 'out of the box' OSX version.
Having run the standard procedure for installing the rvm, which also installs Ruby 1.9.3, then installing gems for rake, compass, sass, bundler and guard, then adding my gems/bin directory to my path I get the following message on running compass:
/home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/dsl.rb:35:in `rescue in eval_gemfile': Gemfile syntax error: (Bundler::GemfileError)
gem "guard", "~> 1.0.1"
^
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/dsl.rb:32:in `eval_gemfile'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/dsl.rb:7:in from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/definition.rb:18:in `build'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler.rb:144:in `definition'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler.rb:112:in `setup'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler.rb:128:in `require'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/gems/compass-0.12.2/bin/compass:26:in `<top (required)>'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/bin/compass:19:in `load'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/bin/compass:19:in `<main>
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `eval'
from /home/m1ke/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `<main>'
All gems were installed with the standard gem install compass syntax, I have also run gem update --system
More information!
The same gem works fine on my Windows install, installed using the Windows RubyInstaller.
Having had no responses I tried removing the gem and installing the ruby-compass package from apt-get. This works fine, but now another gem (not available on apt-get) reports errors the come from both /home/m1ke/.rvm/gems/ruby-1.9.9-p362/ but also from /usr/share/ruby-1.9.1/ which I assume the Compass apt-get installed. So now I may have two Ruby versions fighting...
Found the answer on another thread
Just run rubygems-bundler-uninstaller and the problem was fixed right away. Posting this here instead of just linking as the thread linked didn't come up when I searched my error, as my error was a syntax error whereas the linked post has a "file not found" error.