rails gem 包安裝

MySQL

Posted by zxll on August 3, 2018

##查詢本地gem

    gem list --local |grep '('

##gem 包獲取

    wget 下載或者其他方式
    

##安裝

cd /usr/local/lib/ruby/gems/1.8/cache/
gem install mysql-2.7.gem -- --with-mysql-dir=/usr/local/mysql5530/
cd /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7
ruby extconf.rb --with-mysql-dir=/usr/local/mysql5530/
make && make install

##確認

gem list --local
cd /home/path

ps -auwxf | grep mongrel_rails 
mongrel_rails cluster::stop 
ps -auwxf | grep mongrel_rails 
mongrel_rails cluster::start 
ps -auwxf | grep mongrel_rails

##卸載 gem uninstall (gem-name)

##其他

gem –help

RubyGems is a sophisticated package manager for Ruby. This is a basic help message containing pointers to more information.

Usage: gem -h/–help gem -v/–version gem command [arguments…] [options…]

Examples: gem install rake gem list –local gem build package.gemspec gem help install

Further help: gem help commands list all ‘gem’ commands gem help examples show some examples of usage gem help show help on COMMAND (e.g. ‘gem help install’)

##Examples

*** LOCAL GEMS ***

actionmailer (1.2.5)
    Service layer for easy email delivery and testing.

actionpack (1.12.5)
    Web-flow and rendering framework putting the VC in MVC.

actionwebservice (1.1.6)
    Web service support for Action Pack.

activerecord (1.14.4)
    Implements the ActiveRecord pattern for ORM.

activesupport (1.3.1)
    Support and utility classes used by the Rails framework.

daemons (0.4.4)
    A toolkit to create and control daemons in different ways

gem_plugin (0.2.1)
    A plugin system based only on rubygems that uses dependencies only

hoe (1.2.2)
    Hoe is a way to write Rakefiles much easier and cleaner.

mongrel (0.3.13.3)
    A small fast HTTP library and server that runs Rails, Camping, and
    Nitro apps.

mongrel_cluster (0.2.0)
    Mongrel plugin that provides commands and Capistrano tasks for
    managing multiple Mongrel processes.

mysql (2.7)
    MySQL/Ruby provides the same functions for Ruby programs that the
    MySQL C API provides for C programs.

net-sftp (2.0.4)
    A pure Ruby implementation of the SFTP client protocol

net-ssh (2.0.17)
    Net::SSH: a pure-Ruby implementation of the SSH2 client protocol.

rails (1.1.6)
    Web-application framework with template engine, control-flow layer,
    and ORM.

rake (0.7.3, 0.7.1)
    Ruby based make-like utility.

rmagick (1.13.0)
    RMagick is an interface between the Ruby programming language and
    the ImageMagick and GraphicsMagick image processing libraries.

ruby-hmac (0.3.1)
    An implementation of the HMAC authentication code in Ruby.

rubyforge (0.4.2)
    A simplistic script which automates a limited set of rubyforge
    operations

rubygems-update (1.3.6)
    RubyGems is a package management framework for Ruby

sources (0.0.1)
    This package provides download sources for remote gem installation