I just upgraded to Mountain Lion and had to install Xcode 4.4 (4.1 would not work). I believe this adversely affected my Ruby install, and more specifically Sass.
When I type $ sass --version I get the following error:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:777:in 'report_activate_error': Could not find RubyGem sass (>= 0) (Gem::LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:211:in 'activate'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:1056:in 'gem'
from /usr/bin/sass:18
Any ideas? I am running ruby 1.9.2p320 (2012-04-20 revision 35421)
What I ended up doing was:
$ source ~/.bashrc
And then I did:
$ gem install sass --pre
And that worked. When I do $ sass -v it reports Sass 3.2.0.alpha.275and not the error message above.
Related
I tried to install Sass. I installed Ruby and MSYS2 prior to that, the latest from all with Chocolatey:
choco install ruby
choco install msys2
Seemingly they were properly installed. ruby -v results in:
ruby 2.5.0p0 (2017-12-25 revision 61468) [x64-mingw32]
When I tried to run gem install sass I received the following error message:
ERROR: Error installing sass:
The last version of ffi (< 2, >= 0.5.0) to support your Ruby & RubyGems was 1.9.18. Try installing it with `gem install ffi -v 1.9.18` and then running the current command again
ffi requires Ruby version < 2.5, >= 2.0. The current ruby version is 2.5.0.
Ok, so I attempted to run gem install ffi -v 1.9.18.
I received this error message:
ERROR: Error installing ffi:
The last version of ffi (= 1.9.18) to support your Ruby & RubyGems was 1.9.18. Try installing it with `gem install ffi -v 1.9.18`
ffi requires Ruby version < 2.5, >= 2.0. The current ruby version is 2.5.0.
I tried to reinstall Ruby with proper installer, restarted computer, but the same error appears.
How can I make Sass to get installed?
To install the Ruby version before 2.5 (as mentioned in the comments):
choco install ruby --version 2.4.3.1
I am working through NativeScript's set-up on OS X El Capitan and I am stuck at the point where I am supposed to install xcodeproj and cocoapods. Almost everything that I try to do with gem shows the same error:
$ sudo gem install xcodeproj
ERROR: While executing gem ... (Errno::EINVAL)
Invalid argument
The following commands show the same error, wether I run it with sudo or not:
$ gem update --system
$ gem update
$ gem install whatever
$ gem install cocoapods
I have the following versions:
$ ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
$ gem --version
2.6.7
I've tried some of the help that I've found online, including reinstalling gem and ruby, restarting but nothing has helped.
I guess that I have a configuration problem with Ruby.
Any suggestions on how to troubleshoot this?
I just had a similar issue after updating everything via Homebrew.
I solved the issue by uninstalling Ruby and installing it via rbenv, then reinstalling cocoa pods.
Steps:
Uninstall ruby
brew uninstall ruby
Install rbenv and ruby-build
brew install rbenv ruby-build
You need to add Ruby to your path.
A. If Terminal is your shell.
Add eval "$(rbenv init -)" to ~/.bash_profile
B. Or if you use another shell
You can find the instruction by entering the command rbenv init NAME_OF_YOUR_SHELL.
Install Ruby
rbenv install 2.3.1
Set the Ruby version
rbenv global 2.3.1
rbenv local 2.3.1
Reinstall Cocoapods
gem install cocoapods
I tried installing github-pages using gem:
sudo gem install 'github-pages'
However, I get the following error:
ERROR: Error installing github-pages:
public_suffix requires Ruby version >= 2.0.
But when I checked my ruby version using ruby --version, it shows:
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
So, my understanding is that gem is somehow referencing an older version of Ruby(previous was 1.9.3). How can I fix this problem? My OS is Ubuntu 14.04 and I upgraded ruby using ruby-install.
I believe you do not need to install github-pages globally, as you are trying.
Just removing sudo in front of your command will do the trick:
gem install 'github-pages'
Wishing to migrate I am trying to install and use an existing compass project using 'bootstrap-sass' on a server with OSX 10.8 Mountain Lion installed. So far I've installed xCode, xCode Command Line Tools, Homebrew, Git, Compass and updated Ruby since version 1.8.7 ships with OSX Mountain Lion.
When using 'compass watch' or even 'compass create' I receive the following error. It looks like somehow compass uses the old ruby installation version 1.8.7.
LoadError on line 31 of /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb: no such file to load -- bootstrap-sass
Additional information
$ compass --version
Compass 1.0.3 (Polaris)
$ which compass
/usr/bin/compass
$ ruby version
ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin12.0]
$ which ruby
/usr/local/opt/ruby/bin/ruby
Found the problem:
$ brew docter
Warning: /usr/bin occurs before /usr/local/bin
Adding /usr/local/bin prior to the $PATH at ~/.bash_profile resolved the issue.
I just installed Middleman on my Mac (OS 10.8.2) but am unable to generate a new project. I have Xcode installed. Can anyone tell me what I might have done wrong?
$ middleman init moi
-bash: middleman: command not found
$ gem list
middleman (3.0.12)
middleman-core (3.0.12)
middleman-more (3.0.12)
middleman-sprockets (3.0.9)
$ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-darwin12.2.0]
I'm using rbenv. This is my path:
/Users/me/.rbenv/shims:/opt/local/bin:/opt/local/sbin:/Users/me/downloads/mongodb/bin:/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
If you’ve just installed a new gem in a Ruby installation managed by rbenv, you should run
rbenv rehash
after installing. This generates the shims for the newly-installed gem that will allow you to run it. You can read more in rbenv’s readme.