GEM-related commands use
1. Show help and version of Gem
Copy Code code as follows:
Gem–h/--help
#显示gem的帮助
Gem–v/--version#显示gem的版本号
2. List all available software for the remote library
Copy Co
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 version number2. List all available softwa
Create your own gem and upload it to githubCreate your own gem and upload it to the github environment: centos7, git version 1.8.3.11. Create gem1 to install bundler# Gem install bundler2. Use bundler to create the framework required for gem# Bundler gem file_manipulate3. Mo
Gem Common commands
Gem-v # View version of RubyGems software
gem help #显示RubyGem使用帮助
Gems help Example #列出RubyGem命令一些使用范例
gem install [gemname] # ann Install the specified gem package, the program will first find the GEM
In my previous blog post, I documented how Ruby operates the environment configuration of the MongoDB database in a Windows environment. The last step describes the driver package for installing MongoDB. Using the Gem Online installation method. The purpose of this article is to use GEMS for offline installation of GEM kits when the target machine or environment cannot connect to the Internet.1. in the http
After installing Ror, you plan to run a demo.
Question 1,
$ Ruby script/Server
Rails requires rubygems> = 1.3.1 (You have 1.2.0). Please 'gem update -- system' and try again.
Question 2,
Execute as prompted:$ Sudo gem update -- SystemBut it prompts that the usage of -- system has been disabled:Error: While executing gem... (runtimeerror)
SlaveRailsUpgrade to GEM uninstall and gem cleanupRecentRailsUpgrade from 1.1.6 to 1.2.1. If rails1.1.6 has been installed, how can this problem be solved?
1. Upgrade to 1.2.1 and retain 1.1.6If you do not want to delete the previous version, first download the local installation package rails1.2.1Http://bbs.railschina.com/thread-54-1-1.htmlRun the gem install y
Create your own gem and upload it to GitHubEnvironment: Centos7,git version 1.8.3.1Create a GEM1 installation bundler#gem Install Bundler2 frames required to create a gem using bundler#bundler Gem File_manipulate3 Modify File_manipulate.gemspec File#vim File_manipulate.gemspec(The description and summary are mostly mod
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 world!" end end
. Hola. gemspec
% cat ho
1. Create a New gem
Bundle gem gemname
2. Modify the. gemspec file in gem
S. Summary = % q {todo: Write a gem summary} s. Description = % q {todo: Write a gem description}Modify the content in % q {} to a summary and description. The. gemspec file mainly displays the
Install MySQL gem for half a day before installation.
A small record:
First of all, this article is useful.Article:
Http://geryit.com/blog/2011/01/installing-mysql-with-rails-on-mac-os-x-snow-leopard/
My own environment is
Mac OS X 10.6
$ Rvm -- versionRvm 1.6.5 by Wayne E. Seguin (wayneeseguin@gmail.com) [https://rvm.beginrescueend.com/]
$ Mysql -- versionMySQL ver 14.14 distrib 5.1.57, for apple-darwin10.3.0 (i386) using Readl
When native gem is installed on Mac OS X, dyld_stub_binding_helper and dyldfatalerror cannot be found.
Under Mac OS X10.10, sudo gem install curses returns the following error:
Apple @ kissAir: ruby_src $ sudo gem install curses
Password:
Fetching: curses-1.0.1.gem (100%)
Building native extensions. This cocould take
Ruby
You don't need to talk about this.
RVM
It is used to help you install the Ruby environment, help you manage multiple Ruby environments, and help you manage the Ruby environment on which the Ruby application you develop uses the machine. The Ruby environment is not only Ruby itself, but also a third-party Ruby plug-in on which it depends. All are managed by RVM.
Rails
Needless to say, this is a well-known development framework. Look at http://zh.wikipedia.org/wiki/Ruby_on_Rails in detail
Rub
Soul gem (1s 128MB) soulgem"Problem description""As the soul of your body, in order to be able to better use the magic, has been given a small and safe form ..."We know that the life of a magical maiden is stored in a device called Soul Gem (Soul Gem). And sometimes, when the soul Jewel is farther away from the body, the magical girl is unable to control her body
Why is there this?Due to domestic network reasons (you know), the intermittent connection to the resource file that rubygems.org stored on Amazon S3 failed. So you will encounter gem install rack or bundle install when the time is not responding, specifically can be used gem install rails -V to view the execution process.This is a full rubygems.org image, you can use this instead of the official version, th
there. Else T, as it turns out, thereIsSomething out there: it's called the graphics execution manager, or gem. the intel-sored gem project is all of one month old, as of this writing. the gem developers had not really intended to announce their work quite yet, but the TTM discussion brought the issue to the fore.
Keith Packard's introduction to gemshortdes a do
Install and use bundler in Ruby to manage multiple versions of gem and rubybundler
With rbenv to manage a multi-version ruby environment, we also need a tool that can manage multiple versions of gem (such as rails), that is, bundler. The project background is not detailed, for more information, visit http://bundler.io/on the official website.
Install
gem install
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.