rbenvã使ç¨ãã¦ruby-2.0.0ãruby-1.9.3ãruby-1.9.2çã®ç°ãªããã¼ã¸ã§ã³ã®rubyã使ãåãããããããªç°å¢ãæ´ãã¾ããrbenvã®ã¤ã³ã¹ãã¼ã« githubã®ãªãã¸ããªããcloneãã¦ã¤ã³ã¹ãã¼ã«ãã¾ãã git clone git://github.com/sstephenson/rbenv.git ~/.rbenv PATHã«$HOME/.rbenv/bin:$PATHã追å ãã¦ããã¾ãã ã¾ããrbenvã®shimsãæå¹ã«ããããã«.zshrcã«eval "$(rbenv init -)"ã追å ãã¦ããã¾ãã bashã使ç¨ãã¦ããå ´åã¯.bash_profileã«eval "$(rbenv init -)"ã追å ãã¾ãã ruby-buildã®ã¤ã³ã¹ãã¼ã« rbenvã¯rvmã¨ç°ãªããrubyã®ãã«ããèªåã§è¡ãã¾ããã ruby-buildã
ãã®ãããªå ´åã§ã bundler ã使ãã¨ä¸é¨ã®ãã¼ã¸ã§ã³ãä¸ãããªã©ã解決åºæ¥ãçµã¿åãããããã°ããã¾ã解決ãã¦ããã¾ãã (bundler ã使ã£ãå ´åã®ä¾ã¯å¾ã§åºã¦ãã¾ãã) 1. ruby ãå ¥ãã¦ãã ã¾ã ruby ãã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã Mac ãªã©ã§ã¯ OS ã«æ¨æºã§å ¥ã£ã¦ãã ruby ããã®ã¾ã¾ä½¿ã£ã¦ã大ä¸å¤«ã ã¨æãã¾ãã å ã«æ»ãã«ã¯? ã¤ã³ã¹ãã¼ã«ã«ä½¿ã£ãæ¹æ³ã«ããã®ã§ä¸æ¦ã«ã¯è¨ãã¾ããã 2. rubygems ãå ¥ãã¦ãã 1.8.7 ãªã rubygems ãå ¥ãã¦ããã¾ãã ããã OS ãªã©ã«æ¨æºã§å ¥ã£ã¦ããã°ãããã使ãã°å¤§ä¸å¤«ã§ãã å ã«æ»ãã«ã¯? ruby èªä½ãã¾ããã¨å ¥ãç´ãã®ã楽ã ã¨æãã¾ãã 3. bundler ãå ¥ãã¦ãã gem install bundler 㧠bundler ãå ¥ãã¦ããã¾ãã ãã®å¾ã使ç¨ããã³ãã³ãã¯
Ubuntuã§åãã¦RubyãRailsã«ææ¦ããæ¹ã®ããã«ãææ°ã® Ruby 1.9.3 㨠Ruby on Rails 3.2 ã®ã¤ã³ã¹ãã¼ã«æé ããã詳ãã説æãã¾ãã ãªããæ¬ç¨¿ã§ã¯Rubyã®ã¤ã³ã¹ãã¼ã«ã«rbenvãå©ç¨ãã¾ããapt-getã§ã¤ã³ã¹ãã¼ã«ãããRubyã¯ãã¼ã¸ã§ã³ãå¤ãã®ã§ãï¼æé ãã¡ãã£ã¨è¤éã§ããï¼æ¬ç¨¿ã®æ¹æ³ããå§ããã¾ããã¾ããrbenvãå©ç¨ããã¨ãããã¸ã§ã¯ããã¨ã«Rubyã®ãã¼ã¸ã§ã³ãç°¡åã«åãæ¿ããããã¨ããã¡ãªãããããã¾ãã æ¬ç¨¿ã対象ã¨ãã OS 㯠Ubuntu 12.04 LTS ããã³ Ubuntu 12.10 ã®ãã¹ã¯ãããçã§ããUbuntuä¸ã§Ruby/Railsã®å¦ç¿ãRailsã¢ããªã±ã¼ã·ã§ã³ã®éçºããããæ¹åãã«æ¸ãã¦ãã¾ããéçºããRailsã¢ããªã±ã¼ã·ã§ã³ããµã¼ãçã®Ubuntuã«ã¤ã³ã¹ãã¼ã«ãã¦éç¨ãããæ¹ã¯ãRail
以åãã¤ãã£ãRVMç°å¢ãGemsetsãã¤ãããªãç°å¢ã«ä½ãç´ããã®ã§ã¡ã¢ã Rubyã®ãã¼ã¸ã§ã³ç®¡çãã¼ã« RVM 㯠è¤æ°ãã¼ã¸ã§ã³ã®Ruby 㨠åRubyã®GemãGemsets ã§ç®¡çãããã¤ããã§ç°å¢ãä½ã£ã¦ããã®ã§ããããã®éãRailsåå¼·ä¼ï¼ æ±äº¬ ã«è¡ã£ãã¨ãã«ãGemã®ç®¡çã¯Bundlerã§ãRVM ã§ã¯ Rubyã®ãã¼ã¸ã§ã³ç®¡çã®ã¿ã«ä½¿ãã®ãããããããªããã¨ã¢ããã¤ã¹ãé ãã¦ããããã試ãã¦ã¿ã¾ããã ã¾ããGemã®ç®¡çã¨ããã®ããã¾ãã¡ã¤ã¡ã¼ã¸ãã¤ããã¦ããªãã£ãã®ã§ããGemfileã¨ããè¨å®ãã¡ã¤ã«ã§ Railsã¢ããªãªã©ãGithubãªã©ãããã¦ã³ãã¼ããå¿ è¦ãªGemãBundlerã§ã¤ã³ã¹ãã¼ã« Rails2ã¢ããªãä½ããGemfileãä½æããããã¼ã¸ã§ã³ãåºå® Rails3ã¢ããªãä½ããGemfileã¯èªåä½æãããã追è¨ããããã¼ã¸ã§ã³ãåºå® 空
Rails 3ã®gemã®ç®¡çã«ä½¿ç¨ãããbundlerã®ä½¿ãæ¹ã復ç¿ãã¾ãã Bundlerã®ç¾æç¹ã®ææ°å®å®çã®version 1.2.3ã対象ã¨ãã¾ããBundlerã使ãã¨ä½ãå¬ããã®ãï¼ ããgemãéçºç°å¢ã«ã¯ã¤ã³ã¹ãã¼ã«ããã¦ããããproductionç°å¢ã«ã¯ã¤ã³ã¹ãã¼ã«ããã¦ããªããã¨ãã£ãåé¡ãç¡ããªãã ããã¸ã§ã¯ãã«å¿ è¦ãªgemãã¯ã£ããããããã¨ãã§ããã Bundlerã®ã¤ã³ã¹ãã¼ã« %~ gem install bundler ã·ã¹ãã æ¨æºã®rubyã使ç¨ãã¦ããå ´åã¯sudoãå¿ è¦ãªå ´åãããã¾ããrbenvãrvmã使ç¨ãã¦ããå ´åã¯gem install bundlerã®ã¿ã§ã¤ã³ã¹ãã¼ã«ã§ãã¾ãã bundle checkã§ã¤ã³ã¹ãã¼ã«å¿ è¦ãªgemããã§ã㯠Gemfileã®ä¸ã«è¨è¼ããã¦ããgemã®ãã¡ãããããã©ããã¤ã³ã¹ãã¼ã«ããªããã°ãªããªãã
Rails3ããBundlerãå°å ¥ããgemã®ç®¡çããããããªãã¾ããããè²ã ãªRailsã¢ããªã§ã»ãã»ãbundle installãå®è¡ããã¨ã·ã¹ãã ã«ã¤ã³ã¹ãã¼ã«ãããgemãçµæ§ã«ãªã¹ã«ãªã£ã¦ãã¾ããã¾ããRails2ã¨Rails3ãåå± ããéçºç°å¢ã ã¨ããªãé¢åããããªãã¾ããç²¾ç¥è¡çä¸ãã¾ãå®ããããã¾ããã ããã§bundlerã«ãªãã·ã§ã³ã渡ãã¦gemãä»»æã®ãã£ã¬ã¯ããªã«ã¤ã³ã¹ãã¼ã«ããgemãRailsããã¸ã§ã¯ãæ¯ã«ç®¡çãããã¨ããªã¹ã¹ã¡ãã¾ãã Rails3ã®å ´åã使ãæ¹ã¯ãããªæãã«ãªãã¾ãã ã¾ããããã¸ã§ã¯ãç¨ã®ãã£ã¬ã¯ããªãä½æããGemfileãè¨è¿°ãã¾ãã
CentOS5.8ã«Ruby on Railsã®ç°å¢ãä½æããã®ã§ã¡ã¢ã gitãã¤ã³ã¹ãã¼ã«ããã¦ããåæã sqlite3ã®ã¤ã³ã¹ãã¼ã« sudo yum install sqlite-devel sudo yum install sqlite3 rbenvã®ã¤ã³ã¹ãã¼ã« git clone git://github.com/sstephenson/rbenv.git .rbenv echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc echo 'eval "$(rbenv init -)"' >> ~/.bashrc source ~/.bashrc ruby-buildã®ã¤ã³ã¹ãã¼ã« mkdir -p ~/.rbenv/plugins cd ~/.rbenv/plugins git clone git://github.c
MacOSX CentOS MacOSX rvmããããã·ã³ãã«ãªæ§æã§ãã rbenv + ruby-build æ§æã«ä¹ãæããã®ã§ã¡ã¢ã æ¹éã¨ãã¦ãsudoãä¸å¿ è¦ãªé åã«gemãæ ¼ç´ããããã«ããã ã¾ã㯠rvm ãåé¤ã $ rvm implode # bashrcçã«è¿½å ããèªã¿è¾¼ã¿è¨å®ãæåã§åé¤ããã rbenv, ruby-build ã homebrew ã§ã¤ã³ã¹ãã¼ã«ã ãã£ãã®ï¼ã³ãã³ãã§OKã $ brew install rbenv $ if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi $ brew install ruby-build $ rbenv install 1.9.3-p194 # ãã¼ã¸ã§ã³ãæå®ããªããã°ä¸æ¬ãåºã $ rbenv rehash MacPortsã§ãä¸è¨Ce
GitHub - rbenv/rbenv: Groom your appâs Ruby environmentã使ã£ã¦Rubyç°å¢ãæ§ç¯ãã¾ãããRubyã¯å®è³ªåãã¦ãªã®ã§ãäºã®è¶³ãè¸ãã ãããåããã調ã¹ã¦ã°ããã§ããªããªãå ã«é²ã¾ãªãã£ããããããã©ãããããåºæ¬çãªè¦ç´ ãææ¡åºæ¥ãæãããããªãªã®ã§ãç´°ããæ¸ãããã¦ã¦è¥å¹²ãã©ããããããªãã rbenvã®ã¤ã³ã¹ãã¼ã« $ cd ~ $ git clone git://github.com/sstephenson/rbenv.git .rbenv $ vi .bashrc #rbenv export PATH="$HOME/.rbenv/bin:$PATH" eval "$(rbenv init -)" rbenvèªä½ã¯ããã§ã¤ã³ã¹ãã¼ã«å®äºã ããã§ãTerminalãéããªããçãã¦ã.barhrcãèªã¿è¾¼ã¾ããã ruby-bu
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}