version of the new console that you open later
RVM Use 2.2.0--default
Query for Ruby already installed
RVM List
Uninstall an installed version
RVM Remove 1.8.7
The use of Gemset
RVM not only provides an environment in which multiple Ruby versions coexist, but can also manage different gemset depending on the project.
Gems
Build a Ruby On Rails platform using CentOS
System CentOS6.5 x64
Ruby On Rails is an open-source Web framework written in Ruby, similar to J2EE and PHP. Ruby On Rails is a very beautiful Web development framework and incorporates the essence of agile development: conventions are greater than configurations. You will find that it is really a very beautiful framework! Today we will introduce how to build a Ruby On Rails development environment in Centos.
Tips:
Ruby Version Manager, which includes
is used in rails . So, first installed through the official website command:RVM Pkg Install zlibRVM Pkg Install OpenSSLInstall Ruby not much to say, directly on:RVM Install 1.9.2RVM Install 1.9.3The two commands above will get the latest build of two versions.
4.
set the default Ruby and gemset: (The following will be used to 1.9.2, this version of the time is longer, Some components are more stable)RVM--default Use 1.9.2RVM A set of gem ma
Rbenv is used to manage multiple versions of Ruby in the user directory installation and use, and RVM two select one to use. Specific differences are documented in the rbenv, and there are also discussions in the community.System Requirements
OS X: Find a good place to download Xcode.app from the App Store, run it after installation, and install Command line Tools in the Downloads setup.
Linux: Install the development environment (compile link tools and ruby dependencies) if only JRuby have JR
:
Copy Code code as follows:
RVM Info
List version:
Copy Code code as follows:
RVM List
RVM In addition to managing different versions of Ruby, you can create different gem collections (gemsets) for each Ruby version so that different Ruby applications can use their own gem collections independently. For example, in the case of using ruby-1.9.2-p290, I need to build two rails projects, one using rails-3.0, one using rails-3.1.0, we can create two
RVM is a command-line tool that provides the management and switching of a convenient, multiple-version ruby environment.https://rvm.io/Installation:
# GPG--keyserver hkp://keys.gnupg.net--recv-keys d39dc0e3# curl-l Get.rvm.io | Bash-s Stable# source ~/.BASHRC# source ~/.bash_profile
Delete:
# RVM Implode
Or use a script:
#!/bin/bash/usr/bin/sudo rm-rf $HOME/.RVM $HOME/.RVMRC/ETC/RVMRC/ETC/PROFILE.D/RVM.SH/USR/LOCAL/RVM/USR/LOCAL/BIN/RVM/usr/bin/sudo/usr/sbin/groupdel RVM/bin/echo "RVM is r
version of RVM:
$ Curl https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer | bash-s stable RVM you can install RVM in the $ HOME/. rvm directory by using the above command.
3. Add RVM environment variables to the configuration file:
$ Echo '[[-s "$ HOME/. rvm/scripts/rvm"] source "$ HOME/. rvm/scripts/rvm"'> ~ /. Bashrc$ Source ~ /. Barshrc
4. install some external packages that RUBY depends on:
Sudo apt-get install build-essential bison openssl libreadline6 libreadline6-de
Password:
Retype new Unix Password:
Passwd: Password updated successfully
Changing the user information for deploy
Enter the new value, or press enter for the default
Full name []:
Room number []:
Work phone []:
Home phone []:
Other []:
Is the information correct? [Y/n] y
[Email protected]: ~ $ Echo $ Lang
Zh_CN.UTF-8
Solve the problem above:
Export lang = en
Export signature AG
Export lc_all =
Echo $ Lang
[Email protected]: ~ $ Echo $ Lang
En_US.UTF-8
Grant deploy sudo group permissions to use
References:
Http://www.turnkeylinux.org/forum/support/20110826/how-upgrade-turnkey-rails-rails-301
Https://rvm.beginrescueend.com/rvm/install/
The procedure is as follows:
1. Select root for Installation
2. Install curl
# Install curl. It's needed to install rvm the easy way. Ignore the error about the java. So:Apt-Get install curl3. Install rvm
# Install rvm: (here Bash is followed by a space, and then Bash
4. Install ruby1.9.2 in rvm
# Install 1.9.2 under rvm:Rvm install
-- defaultQuery the current version:Copy codeThe Code is as follows:Rvm info
List versions:Copy codeThe Code is as follows:Rvm listIn addition to managing different ruby versions, rvm can also create different gemsets for each ruby version so that different Ruby applications can use their own Gem sets independently. For example, when using a ruby-1.9.2-p290, I need to build two rails projects, one using rails-3.0 and the other using rails-3.1.0, we can create two gemsets, install the correspond
- #download % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 14.0M 100 14.0M 0 0 852k 0 0:00:16 0:00:16 --:--:-- 980kNo checksum for downloaded archive, recording checksum in user configuration.ruby-2.4.0 - #validate archiveruby-2.4.0 - #extractruby-2.4.0 - #validate binaryruby-2.4.0 - #setupruby-2.4.0 - #gemset created /usr
installationAfter the installation is complete RVM List view versionIf there are multiple versions using RVM use 2.2.0 to switch versions RVM uses 2.2.0--default to specify the default versionRuby-v See ruby versionRuby Installation Complete4. Install RailsLearn Gemset Https://ruby-china.org/wiki/rvm-guideGemset can be understood as an independent virtual GEM environment where each gemset is independent of
This is a creation in
Article, where the information may have evolved or changed.
We need independent workspace.
When we are developing a project, we always want a project to use a single workspace to isolate the dependent environment for each project. In the case of a Ruby project, if the public workspace would cause Gemset to be public, it might be difficult to isolate the different gems of each project at the time of multi-project development, and
)Source. bashrc
$ sudo apt-get install nodejs
5. Ruby installation and switchingList known Ruby versionsRvm List knownInstall a ruby versionRvm install 1.9.3The latest 1.9.3 is installed here. You can install it in the rvm List known list.
Use a ruby versionRvm use 1.9.3If you want to set it to the default version, you can
Rvm use 1.9.3 -- defaultQuery installed RubyRvm listUninstall an installed versionRvm remove 1.9.2
6. Install the yaml Library:Apt-Get install libyaml-Dev
7. Because there are
Environment: Ubuntu lts 12.04 (free usage tier)
0. preparation:
0.1. Update the system$ Sudo apt-Get update$ Sudo apt-Get upgrade0.2 install the compiling environment$ Sudo apt-Get install build-essential Git-core$ Sudo apt-Get install curl1. Install rvm and ruby1.9.31.1 install rvmRun the following command:$ Bash-s stable Modify the. bashrc file. Note that Ubuntu in/home/Ubuntu is the user name and must be replaced with your own.$ Echo '[[-s "/home/Ubuntu /. rvm/scripts/rvm "] source"/home/Ubu
main project to the Pods project. The PODS project is eventually compiled into a file called LIBPODS.A, and the main project only needs to rely on this. a file.
Second, installation
1. Install Ruby Environment
here's how to install Ruby:
1), install through Ruby source code
1>, download Ruby source from Ruby official website, https://www.ruby-lang.org/en/downloads/, unzip
2>, CD to unzip directory, execute
$./configure
3>, execution
$ make
4>, execution
$ make Install
5>, execut
Brief introductionSometimes the following error occurs when installing CocoapodsERROR: Error installing cocoapods: activesupport requires Ruby version >= 2.2.2.
1
This means that your ruby environment needs to be updated, and I'll take the detailed steps to update the Ruby environment using the update Ruby method under Mac OS 10.11 as an example.Causes and scenariosDuring the installation of Cocoapods, the Ruby version is required to be at least 2.2.2, while the Ruby version curre
Since you are ready to use bootstrap in your project, you will be prompted for a ruby version at 1.9.2 during the installation of Bootstrap, while the Ruby version that is currently in use is the 1.8.7 that comes with the Mac system. So you need to upgrade Ruby. In this case, Ruby is upgraded using RVM, which is as follows:1, installation RVMRvm:ruby version Manager,ruby release manager, including Ruby version management and GEM Library Management (Gemset
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.