Giter VIP home page Giter VIP logo

Comments (13)

zmoazeni avatar zmoazeni commented on June 14, 2024

Hey @Boldewyn that's because you're running it with ruby v1.8.x. Try installing 1.9.x+ and giving it a shot.

Ruby v1.8.x is at its "end of life" and will sunset soon so it won't receive any new updates (especially security updates).

from csscss.

Boldewyn avatar Boldewyn commented on June 14, 2024

My Debian uses Ruby 1.9, unfortunately:

$ ruby --version
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

from csscss.

zmoazeni avatar zmoazeni commented on June 14, 2024

I'm guessing your gem command is using an older version of ruby. You can check this out by running gem environment

Seeing /usr/lib/ruby/gems/1.8/gems/csscss-1.0.0/lib/csscss/cli.rb in your backtrace tips me off to that.

If you run which ruby it should give you a path that includes a different gem command that you can run (the version that is used by 1.9.x).

from csscss.

Boldewyn avatar Boldewyn commented on June 14, 2024

OK, that was indeed the problem. Somehow I had /usr/local/bin/gem linked to /usr/bin/gem1.8 for whatever reason. Re-installing with the 1.9 gem fixed it. Thanks!

from csscss.

zmoazeni avatar zmoazeni commented on June 14, 2024

@Boldewyn Awesome. Let me know if you run into any other issues.

from csscss.

kevboutin avatar kevboutin commented on June 14, 2024

I have a similar issue.

$ export GEM_HOME=/Library/Ruby/Gems/1.8
$ gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
blankslate (2.1.2.4)
colorize (0.5.8)
csscss (1.0.0)
io-console (0.3)
json (1.7.7, 1.5.4)
minitest (2.5.1)
parslet (1.5.0)
rake (0.9.2.2)
rdoc (3.9.4)
require (0.2.7)
rubygems-update (2.0.3)

$ which csscss
/usr/bin/csscss

$ sudo gem uninstall csscss -Vxa
$ gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
blankslate (2.1.2.4)
colorize (0.5.8)
csscss (1.0.0)
io-console (0.3)
json (1.7.7, 1.5.4)
minitest (2.5.1)
parslet (1.5.0)
rake (0.9.2.2)
rdoc (3.9.4)
require (0.2.7)
rubygems-update (2.0.3)

It will not uninstall it from the 1.8 gem. If I can get it uninstalled from there, then I can use the new gem I already have installed. Unfortunately installing csscss to the new gem will not override the 1.8 version due to the executable being in /usr/bin/.

from csscss.

kevboutin avatar kevboutin commented on June 14, 2024

Oh and I used the -i switch to specify ~/.gem location as well but it's not in that location anyway.

from csscss.

kevboutin avatar kevboutin commented on June 14, 2024

My problem is not because of the Ruby version. I have 1.9 installed already. I need to get csscss off the 1.8 installation.

$ ruby -version
ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-darwin12.3.0]
-e:1:in <main>': undefined local variable or methodrsion' for main:Object (NameError)

from csscss.

zmoazeni avatar zmoazeni commented on June 14, 2024

My problem is not because of the Ruby version. I have 1.9 installed already. I need to get csscss off the 1.8 installation.

gem uninstall csscss should work if that's not working, then it looks like your gem paths are crossed with 1.8 and 1.9.

I recommend gem environment and which gem to help figure that out.

from csscss.

nilsborg avatar nilsborg commented on June 14, 2024

@kevboutin @zmoazeni someone asked in another thread how i uninstalled the 1.8 gem and installed the 1.9:

I used the 1.8 bin that ships with Mac OS and since my 1.9 version is used when just typing 'ruby', i called the system ruby with the full path:

sudo /usr/bin/gem uninstall csscss

and after that just install again with your shiny new 1.9 (in my case installed via brew):

gem install csscss

from csscss.

zmoazeni avatar zmoazeni commented on June 14, 2024

@kevboutin @nilsborchers I'd also recommend looking into rvm, rbenv, or chruby. Installing and dealing with multiple rubies can be a pain and these make it much much easier.

from csscss.

kevboutin avatar kevboutin commented on June 14, 2024

Awesome... thanks! I have it working now.

from csscss.

mitchleung avatar mitchleung commented on June 14, 2024

in my case on ubuntu, I need to remove /usr/bin/csscss MANUALLY before I can install csscss correctly AFTER setting ruby and gem with
update-alternatives --config ruby
and
update-alternatives --config gem
to 1.9

from csscss.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.