How to handle different versions (Bourbon) of ruby gems on my Mac - ruby

I installed the bourbon gem on my OSX machine some weeks ago:
gem install bourbon
Now i have problems with bourbon in a web project (gulp says "mixins not found") so I wanted to uninstall and re-install the gem. So I typed:
$ gem uninstall bourbon
Surprisingly I get the following message in the terminal:
Select gem to uninstall:
1. bourbon-4.2.6
2. bourbon-5.0.0.beta.3
3. bourbon-5.0.0.beta.4
4. All versions
Hm? It seems that there are different versions of the gem installed and doing
bourbon install
in my project folder installs the latest beta (which lacks some SASS mixins I think). I thought when I install or update a gem that the older gems are deleted or overwritten. So how to handle this the best?

run this:
$ gem uninstall bourbon
Select 4 to uninstall all the versions. Then install the gem again using the command.
gem install bourbon -v 4.2.6
Hopefully it will help.

Related

Can't remove hidden SASS 3.3.0 gem

I have installed installed RVM and tried to setup compass - had some errors, so I tried to do it by installing Ruby and then doing everything step by step. THe thing is RVM gems conflict with the ruby gems and whatever I do, even though I Removed .rvm and ran rvm implode and searched for the sas 3.3.0 folder and deleted it manually it still says that ..., because sass-3.2.19 conflicts with sass (~> 3.3.0) . WHen I do gem list it does not show 3.3.0 , when I try to run compass it's always the same, i'm tired of searching for solutions, but I don't want to reinstall my ubuntu and set everything all up again.
What else could I try to remove that hidden gem from the system? I tried everything I could find - no use at all! There has to be a way to exclude taht dependency to not include 3.3.0 at all!
Maybe installing rvm and creating new gemset would help?
These commands might help you out:
# remove all old versions of the gem
gem cleanup rjb
# choose which ones you want to remove
gem uninstall rjb
# remove version 1.1.9 only
gem uninstall rjb --version 1.1.9
# remove all versions less than 1.3.4
gem uninstall rjb --version '<1.3.4'

CodeKit: Sass/Compass Conflicts

I get this error when I try to compile using Compass on Codekit:
Compass failed to run because your Mac has an older version of Sass
and/or Compass installed that conflicts with the newer versions in
CodeKit. You must remove all versions of Sass below 3.3.rc6 and all
versions of Compass below 1.0.alpha18. Do this at the command line by
running 'sudo gem uninstall sass' and 'sudo gem uninstall compass'.
I ran sudo gem uninstall sass and sudo gem uninstall compass, however when I try to compile through CodeKit again I get the same error.
try running gem query --local this will list local gems, once you have a list, just go through and remove all sass+compass related gems with sudo gem uninstall ___, pretty sure that compass also has compass-core, but there are probably more
How have you initially installed your gems? Is it possible that you've also installed gems with just gem install? Cuz sudo gem installs gems as root for all users while gem install only installs gems for your active user. So maybe gems left installed which aren't uninstalled with sudo gem uninstall?
On the other hand why uninstall compass at all. I am running Codekit 2.1 with its internal Sass 3.3.10 along with the external gem Compass 0.12.4. That actually works quite well. You have go to Codekit Preferences -> Other Tools -> Compassand choose the radio button "Use the Compass executable at this path" and select your Compass gem then.
If you are using RVM for your ruby management then switch to your system ruby version
rvm use system
and install sass and compass for this version
sudo gem install sass
sudo gem install compass
This worked for me!

Cannot install Ruby Gems in Windows 7

I have successfully installed Ruby Gems on my Mac many times. I need to configure a Windows 7 Enterprise virtual machine with Compass, Sass and Suzy.
I downloaded an installed Ruby on the Windows machine with the installer, 1.9.3. I ran gem update --system which updated Rubygems to 1.8.4.
I was able to install Sass 3.2 by running gem install sass
However, if I run gem install compass or gem install susy I get an error:
Error while excecuting gem .. (ArgumentError) marshall data too short
Any ideas? At this point, I can't install those gems.
The alternative solution..: Download gem compass from here to your ruby root folder. Then try again
gem install compass
It should install this time..Good luck
Had same issue, updating rubygems system solved it. Just use the following command
gem update --system
For those finding this question, many great tips here. Using them, I found this solution to work:
At the N: prompt in "start command line with ruby environment", I used the command rmdir /S .gem which deleted all gems. I then installed them again with gem install as directed on their respective host web pages. Hope this helps someone.

Updating gems on my mac - two versions of bundler installed

I had tons of gems on my local machine which I were installed before and after RVM, so I decided to wipe them all and reinstall. Everything seemed to go ok, except bundler:
gem list
.....
bundler (1.1.3, 1.0.22)
I don't know why 1.0.22 is still there, and I can't figure out how to get rid of it!
$ gem cleanup
Cleaning up installed gems...
Attempting to uninstall bundler-1.0.22
Unable to uninstall bundler-1.0.22:
Gem::InstallError: gem "bundler" is not installed
Clean Up Complete
$ gem uninstall bundler-1.0.22
INFO: gem "bundler-1.0.22" is not installed
UPDATE 1
Path info as requested by Andrew
/Users/brandon/.rvm/gems/ruby-1.9.3-p125-perf#global/gems/bundler-1.0.22/
What's most likely happening is that the two versions of Bundler are installed in two different gemsets, one of which is inheriting from the other. 1.0.22 is probably installed in the global gemset (rvm use #global), or "root" gemset (rvm use <ruby_version>). Once you're in the gemset that has 1.0.22 installed, you should be able to remove it with gem uninstall bundler.

uninstall sass gem

I just upgraded to OSX lion and my sass no longer works. I keep getting this error on the watch command
ents.rb:27: [BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
I read online that if you uninstall the sass gem and reinstall it it will fix the problem. I'm just not sure how to do that. Can anyone please help.
Open Terminal, and type:
sudo gem uninstall sass
Then type:
sudo gem install sass
Also if you install compass, it will install sass by default:
sudo gem install compass
To check which version you have installed, type sass -v
If this still doesn't solve your problem then you may want to re-install Ruby / Xcode.
Try this
to uninstall:
gem uninstall -Iax sass
& then to re-install use:
gem install sass --pre
or
gem install sass
The general problem is that every new version of the OSX ships with a new Mac Ruby compiler. The best way to avoid those kind kinds of problems is to use RVM (Ruby Version Manager) to manage your Ruby versions and avoid conflicts and missing gems (not really missing, just located in an older Ruby version).
RVM helps you keep all your gems organised and easy switching to different versions of Ruby.
For example, I use 1.9.2 version of Ruby using RVM, all my gems are located in my 1.9.2 Ruby folder. Easier to keep track, and easy to switch to newer versions of Ruby if needed.

Resources