亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

Ubuntu 安裝 rvm / ruby Install RVM ( Ruby Ve

系統(tǒng) 2263 0

?

alt text

?

In this article I will explain how you can get RVM (Ruby Version Manager) installed on Ubuntu 12.04 Linux. First we have to make sure that we have some dependencies installed, so run the following command to take care of them.

      sudo apt-get install build-essential git-core
    

?

Now we need to install RVM (Ruby Version Manager) using curl. If you do not have curl installed yet on your system, you can issue the following command

      sudo apt-get install curl
    

?

To start the RVM installation run the following command

      bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
    

?

Now we need to add a line to our bashrc file so run the following command

      echo '[[ -s "/home/andre/.rvm/scripts/rvm" ]] && source "/home/andre/.rvm/scripts/rvm"' >> ~/.bashrc
# or  .zshrc
    
?

Make sure to replace andre with your user name in the above command so that you will not have any issues on your system. Now run

      source ~/.bashrc
# or .zshrc
    

?

To test if our installation of RVM was succesfull, we can run a command and check its output.

      type rvm | head -1
    

?

If the output of the above command is equivalent to rvm is a function , then we now have a working RVM installation. Now our Ruby Version Manager is installed and we can go ahead and install all the Rubies we want. To extend this article a little more I will go over how to install an actual Ruby version and also a Ruby Gem. So here we go...

      rvm install 1.9.3
    

?

The above command will install Ruby version 1.9.3 under your .rvm directory. To make the Ruby the default one we run

      rvm use --default 1.9.3
    

?

Now let us install the Ruby Gem Mysql2 which is needed for mostly everything I do. It may be possible that we need some dependencies depending on your system. On my Ubuntu 12.04 installation I did not need to install the dependencies but have seen it in the wild being asked so this command might save you some headaches...

      sudo apt-get install mysql-client mysql-server libmysql-ruby libmysqlclient-dev
    

?

To install the Ruby Gem Mysql2 run the following command in you Ubuntu 12.04 installation

      rvm 1.9.3 do gem install mysql2
    

?

If you installed Ruby 1.9.3 then the command to install Mysql2 will be exactly like above. If you used a different version of Ruby then make sure you put the version or full Ruby name and replace 1.9.3 above with your needs.

If you need to fall back to your system's Ruby that might have been pre-installed you can use the following command:

      rvm use system
    

?

UPDATE

To have your terminal behave properly with Ubuntu 12.04 after you reboot we need to set the

> Run command as login shell

setting. To do that open up a terminal by pressing CTRL+ALT+t. Once your terminal is open, right click the terminal, and click on Profiles then Profile Preferences.

Now click on the Title and Command tab. Check Run command as a login shell. Now close the window.

Now we need to do one more thing. Run the following command in the terminal:

      gedit ~/.bash_profile
    
?

This will open a text editor where we will add the following two lines:

      source ~/.profile
source ~/.bashrc
    

?

The reason this works is because we told the terminal to start as a login shell. This fixes an issue with RVM that happens when the terminal can't recognize RVM.

?

來源:http://www.andrehonsberg.com/article/install-rvm-ubuntu-1204-linux-for-ruby-193

?

亦可以參考:https://rvm.io/rvm/install

?

Ubuntu 安裝 rvm / ruby Install RVM ( Ruby Version Manager ) Linux for Ruby 1.9.3


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫作最大的動(dòng)力,如果您喜歡我的文章,感覺我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會(huì)非常 感謝您的哦?。?!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: a毛片a毛片a视频 | 欧美理论大片清免费观看 | 日韩天天摸天天澡天天爽视频 | 久热免费视频 | 亚洲国产www | 亚洲视频在线网 | 亚洲成人99| 国产精品国产亚洲精品不卡 | 大胆国模一区二区三区伊人 | 中文字幕亚洲 综合久久 | 91久久青草精品38国产 | 亚洲欧美综合网 | 996热这里有精品青青草原 | 日韩中文字幕一在线 | 精品免费久久久久久影院 | 麻豆国产精品 | 日本一级毛片片免费观看 | 亚洲国产精品成人午夜在线观看 | 性一交一乱一视频免费看 | 亚洲精品一区二区伦理 | 前任4在线观看 | 特级aav毛片日本免费视频 | 91久久综合九色综合欧美亚洲 | 亚洲国产人久久久成人精品网站 | 99久久综合九九亚洲 | se999se男人最爱 | 五月婷婷亚洲 | 国产精品原创永久在线观看 | 国产一区二区免费在线观看 | 伊人久久亚洲综合 | 久久精品视频免费播放 | 黄色片网站在线观看 | 久久午夜宅男免费网站 | 综合另类小说色区色噜噜 | 色综合欧美色综合七久久 | 日韩3区| 中文字幕视频一区 | 欧美性视频一区二区三区 | 91久久青草精品38国产 | 久久国产精品麻豆映画 | 国内精品小视频 |