I started to get in touch with sass today. I will post the things I learn every day, the problems I encounter, and the solutions to my blog. Friends who want to learn can use it as a reference to avoid detours.
Because sass depends on the ruby environment, make sure ruby is installed before installing sass. Download ruby from the Pioneer official website
When installing, please check the Add Ruby executables to your PATH option and add environment variables, otherwise when you use the compiled software in the future, you will be prompted that the ruby environment cannot be found
After installing ruby, in the start menu, find the ruby we just installed, open Start Command Prompt with Ruby
and then directly in the command Type gem install sass in the line and press Enter to confirm. Wait for a while and
will prompt you that sass is successfully installed. Recently, because of the strong wall, if you have not successfully installed it, please refer to the Taobao RubyGems image below to install sass. If it is successful, ignore it.
Upgrade the command behavior of the sass version
gem update sass
View the command behavior of the sass version
sass -v
You also You can run the help command line to see the commands you need
sass -h
Due to domestic network reasons (you know ), causing intermittent connection failures to rubygems.org's resource files stored on Amazon S3. At this time, we can configure the source through the gem sources command. First remove the default https://rubygems.org source, then add the Taobao source https://ruby.taobao.org/, and then check the currently used source. Which, if it is from Taobao, it means that you can enter the sass installation command gem install sass
The command to delete the source is:
gem sources -r url address
The command to add sources is:
gem sources -a url address
The command to view the current source is:
gem sources
-------------------------------The following commands are reproduced in Ruby study notes---------- ----------------------------------
gem -v #gem version
gem source #gem resource
gem sources -a url |gem sources -r url #gemAdd or delete configuration source
gem update #Update all packages
gem update --system #Update RubyGems software
gem install rake #Install rake, from local or remote server
gem install rake --remote #Install rake, from remote server
gem install watir -v (or --version) 1.6.2 #Specify the installation version
gem uninstall rake #Uninstall the rake package
gem list d #List local files starting with d Package
gem query -n ''[0-9]'' --local #Find local packages containing numbers
gem search log --both #From local and remote servers Search for packages containing log strings
gem search log --remoter #Only search for packages containing log strings on the remote server
gem search -r log #Only search on the remote server Packages containing log strings
gem help #Reminder help
gem help install #List install command help
gem help examples #List some gem commands to use Example
gem build rake.gemspec #Compile rake.gemspec into rake.gem
gem check -v pkg/rake-0.4.0.gem #Check whether rake is valid
gem cleanup #Clear old versions of all packages and keep the latest versions
gem contents rake #Display files included in the rake package
gem dependency rails -v 0.10.1 #List and Rails interdependent packages
gem environment #View gem environment
-------------------------- -------------------------------------------------- -------