required gems will be an exceptionally painful experience, fortunately, now you can use the mirror taobao:
$ gem Sources--remove https://rubygems.org/
$ gem sources-a http://ruby.taobao.org/
$ gem sources-l
If the display:
Current SOURCES * * *
http://ruby.taobao.org
It means the change is successful, you can now install Rugy gems f
:
(in/usr/local/system/entos/netposa_redmine)
Rake Gems: Build # Build any native extensions for unpacked gems
Rake Gems: Build: Force # Force the build of all gems
Rake Gems: Install # installs all required gems.
Rake Gems: Refresh_specs # Regenerate gem speci
Ruby-v # view the ruby VERSION ruby-e '''require "watir"; puts Watir: IE: version'' # view the watir VERSION
Rvm list known # list known ruby versions
Rvm install 1.9.3
Rvm use 1.9.3 | rvm use system
Rvm use 1.9.3 -- default
Rvm list # list local ruby versions
Rvm remove 1.9
Problem Description:
Under the Ubuntu system, the Ruby development environment is installed first through the command sudo apt-get install Ruby, and then with the command-line gem install Jekyll install the GitHub page's development tool Jekyll, encountered an error message: Failed to build
Ruby-v #查看ruby version ruby-e ' require ' watir; Puts Watir::ie::version ' #查看watir版本
RVM list Known #列出已知的ruby版本
RVM Install 1.9.3
RVM Use 1.9.3 | RVM Use System
RVM Use 1.9.3--default
RVM List #列出本地ruby版本
RVM Remove 1.9.2
See RVM Practical Guide for specific details
Tutorial on creating a custom Ruby gem package, rubygem
Write a simple example
1. Create the following folder
Note: The lib directory must have a rb file with the same name as your gem.
Copy codeThe Code is as follows:$ Cd hola$ Tree.├ ── Hola. gemspec── Lib└ ── Hola. rb
2. write code
. Hola. rb
% cat lib/hola.rb class Hola def self.hi puts "Hello worl
After building the Ruby on Rails environment, running the bundle command in a new project encounters the following error:Workaround: Install DevkitTo rubyinstaller website download page Select the Devkit download for your system (here I downloaded the last one):When the download is complete, double-click devkit-mingw64-64-4.7.2-20130224-1432-sfx.exe:Set the extracted folder (for example, C:\DevKit), after decompression to see, the contents of the fold
that contains executable files.
1. Build a bin folder in just the engineering directory
The executable file is generated, and the Modify permission is runnable.
% mkdir bin
% touch Bin/hola
% chmod a+x Bin/hola
2. Modify the contents of the executable fileBin/hola
#!/usr/bin/env Ruby
require ' Hola '
puts Hola.hi (argv[0)
Test under
%
always be the first Gem installed on the system. Rake is a build tool similar to Make, but it allows Ruby to write Rakefile (how to build a definition file ), specifically, a specific DSL (domain-specific language) is used to provide high readability while maintaining Ruby's powerful functions. Rails uses rake extensi
always be the first gem installed on the system. Rake is a build tool similar to make, but it allows Ruby to write rakefile (how to build a definition file ), specifically, a specific DSL (domain-specific language) is used to provide high readability while maintaining Ruby's powerful functions. Rails uses rake extensi
it should always be the first gem you install on the system. Rake is a build tool that is similar to make, but it allows Ruby to write Rakefile (how to build a definition file) that uses a particular DSL (Domain-specific language, domain-specific language), Provides high readability while maintaining the power of
Transferred from: http://www.jianshu.com/p/728184da1699Gem Introduction:Gem is a standard package for managing Ruby libraries and programs, and it is easy to find, install, upgrade, and uninstall packages through Ruby Gems such as http://rubygems.org/.Ruby 1.9. Version 2 has the Ruby
Ruby Gem command and rubygem command
I. Introduction
Gem is a standard package for managing Ruby libraries and programs. It is very convenient to find, install, upgrade, and uninstall software packages through Ruby Gem (such as h
Common Ruby Package Manager gem commands and common rubygem commands
Gem-related commands
1. display the help and version of gemCopy codeThe Code is as follows:Gem-h/-- help# Display the help of gem
Gem-v/-- version# Display the gem
Use Fastlane for fast, continuous updates and a range of issues during installation:1. Installing the Fastlane:sudo gem install FastlaneErrorERROR: Failed to build gem native extension.--remove http://rubygems.org/-a https://ruby.taobao.org/# View current gem source gem sour
Ruby on rails gem install pg cannot be installed, rubyrails
gem install pg -v '0.18.2'Building native extensions. This could take a while...ERROR: Error installing pg: ERROR: Failed to build gem native extension. current directory: /Users/bevan/.rvm/gems/
failed. Here to replace the default mirror image for Taobao.
Gem sources--remove https://rubygems.org/
gem sources-a https://ruby.taobao.org/
gem sources-l
* * * Current SOURCES * * *
https://ruby.taobao.org
# Please make sure only ruby.taobao.org
Managing multiple versions of gems with Bundlerwith RBENV to manage multiple versions of the
follows:
Gem INS Rake
The local installation will be attempted first and will be downloaded remotely if not locally.
Copy Code code as follows:
Gem List-b ^c
Lists local and remote software that starts with C
8. Browse all installed software and their documentation
Copy Code code as follows:
Gem_server
A Web server will be generated to open t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.