1
을 종료하지만 주로 작동하지 난하지만 서브 쉘에서 디렉토리를 변경하고 일도가 처음부터 rbenv를 설치하는 bash는 스크립트를 작성하려고 시도하고 설치합니다.
#!/bin/bash
echo "installing rbenv ruby manager manager"
cd ~
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
source .bash_profile
echo "installing ruby build for rbenv"
git clone https://github.com/sstephenson/ruby-build.git
cd ruby-build
sudo ./install.sh
echo "rbenv and ruby-build have been installed, installing ruby now.."
sleep 2
read -p "would you like chronospere to install ruby 1.9.3 [y/n]" RESP
if [ "$RESP" = "y" ]; then
rbenv install 1.9.3-p327
rbenv rehash
rbenv global 1.9.3-p327
ruby -v
else
echo "alrigt skipping.. vagrant has rbenv installed you can install ruby it at your leisure "
echo "hold cmd, and double clck https://github.com/sstephenson/rbenv for more info"
fi
cd ~
그래서 설치하는 것처럼 보입니다. 하지만 내 코드 dosent의 대부분을 실행하거나 나던처럼 장소 ID에서 실행 얻을.
[email protected]:/vagrant$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux]
[email protected]:/vagrant$ rbenv
The program 'rbenv' is currently not installed. You can install it by typing:
sudo apt-get install rbenv
아무것도 내가 수동으로
[email protected]:~$ rbenv
rbenv 0.4.0-45-g060f141
[email protected]:~$ rbenv versions
* system (set by /home/vagrant/.rbenv/version)
1.9.3-p327
[email protected]:~$ rbenv global 1.9.3-p327
[email protected]:~$ ruby -v
ruby 1.9.3p327 (2012-11-10 revision 37606) [x86_64-linux]
그래서 당신은 수있는만큼 bash_profile 소스 후 source .bash_profile
가
[email protected]:/vagrant$ cd
[email protected]:~$ cd ~
[email protected]:~$ source .bash_profile
를 결코 일어나지 않았다이었다 단지 무슨 일이 설치되지 않은 것처럼 당신은 볼 수 코드가 마치 한 디렉토리에서 다른 디렉토리로 이동하지 않는 것처럼 보입니다. 나는 이것이 가능한지조차 모른다. ~/(HOME)에서/ruby로 이동하면 ~/to/vagrant로 돌아갑니다. 이것은 하나의 bash 스크립트에서 가능합니다.