How to install and run compass with rvm and gem?

11,071

Solution 1

$ rvm wrapper 1.9.3@compass --no-prefix compass

Solution 2

assuming that rvm is installed you could do something like:

$ rvm install 2.1.1
$ rvm @global do gem install compass

No need to do sudo.

Share:
11,071
iron9light
Author by

iron9light

Updated on June 04, 2022

Comments

  • iron9light
    iron9light almost 2 years

    OS: Mint Linux 11 64bit

    I know nothing about ruby, I just want Compass.

    I've installed rvm and ruby 1.9.3, and set the default ruby

    $ rvm list
    
    rvm rubies
    
    =* ruby-1.9.3-p125 [ x86_64 ]
    
    # => - current
    # =* - current && default
    #  * - default
    

    I've installed compass via gem

    $ gem list
    
    *** LOCAL GEMS ***
    
    bundler (1.1.3)
    chunky_png (1.2.5)
    compass (0.12.1)
    fssm (0.2.8.1)
    rake (0.9.2)
    rubygems-bundler (0.2.8)
    sass (3.1.15)
    

    But I cannot run compass, because gem/bin is not in $PATH

    I added it to $PATH and run compass again:

    $ compass
    /home/il/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find compass (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
    from /home/il/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /home/il/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems.rb:1230:in `gem'
    from /home/il/.rvm/gems/ruby-1.9.3-p125/bin/compass:18:in `<main>'
    

    Can anyone help please?

  • Gabo Esquivel
    Gabo Esquivel over 11 years
    Thank you iron9light, that worked! people starting to work with ruby may want to read about rmv gemsets rvm.io/gemsets, you should use that as best practice to avoid conflicts
  • Mak
    Mak over 9 years
    Thanks! that fixed my issue