Error: SASS installation for windows

前端 未结 11 1257
说谎
说谎 2020-12-04 17:20

am trying to install sass after installing ruby, but iam getting following error, please help me to fix this

    maradhak@WW730VW7X1688 /c/softwares
    $ ge         


        
相关标签:
11条回答
  • 2020-12-04 18:16

    I'm totally new to Ruby and Sass. I didn't want to risk security and I'm on a Windows machine. I had already installed latest ruby, but kept getting the same error message as the OP when trying to run gem install sass at the command prompt.

    Here's what solved the problem for me.

    Go to: https://rubygems.org/pages/download and follow the instructions on the page starting here (for manual installation):

    If you don't have any RubyGems installed, there is still the pre-gem approach to getting software, doing it manually:

    1. Download from above (URL above)
    2. Unpack/unzip into a directory and cd there (into the directory you unzipped it)
    3. Install with: ruby setup.rb (at the command line type that command. You may need admin/root privilege)

    After I installed ruby gems, I opened Ruby command prompt (using Start Command Prompt with Ruby from the start menu) and ran the command gem install sass and it worked:

    C:\Users\chris>gem install sass
    Fetching: sass-3.4.22.gem (100%)
    Successfully installed sass-3.4.22
    Parsing documentation for sass-3.4.22
    Installing ri documentation for sass-3.4.22
    Done installing documentation for sass after 36 seconds
    1 gem installed
    

    Wanted to detail it as much as possible for other newbies like me. Hope this helps someone.

    0 讨论(0)
  • 2020-12-04 18:17

    Following worked for me:

    Remove the https source temporary, run gem update --system and then switch back to https.

    gem sources --remove https://rubygems.org/
    gem sources --add http://rubygems.org
    gem update --system
    gem sources --remove http://rubygems.org
    gem sources --add https://rubygems.org
    

    Ref: https://github.com/rubygems/rubygems/issues/1736

    0 讨论(0)
  • 2020-12-04 18:20

    You don't need to disable SSH or downgrade your ruby version, you can simply install the SASS gem manually. Here's how to do it:

    1. On windows, first install the Ruby installer for windows.
    2. Download the latest version of the gem from here: https://rubygems.org/gems/sass Click the latest version, and then on the right side of the screen (in Links section) click the "Download" link to download the original gem file (sass-*.*.*.gem)
    3. Now paste the downloaded gem file to the directory that ruby is installed on: C:\Ruby22-x64\bin\sass-*.*.*.gem
    4. In Command Prompt run the following commands:
      cd C:Ruby22-x64/bin
      gem install sass-*.*.*.gem1

    NOTE: You may also need to call the local flag while installing the gem: gem install --local C:Ruby22-x64/bin/sass-*.*.*.gem

    0 讨论(0)
  • 2020-12-04 18:23

    For me it was a proxy issue. When I appended the proxy details to the gem install command it worked.

    gem install sass --http-proxy=http://<yourproxy>:<port>
    
    0 讨论(0)
  • 2020-12-04 18:24

    thanks for your suggestions, as you guys said this seems to be SSH update issue.

    have solved this issue simply down graded my RUBY version from "2.1.5" to "1.8", and the gem version is "1.8.29".

    then i was able to install SASS

    0 讨论(0)
提交回复
热议问题