Tuesday, May 8, 2012

rbenv on macmini

instruction
- https://github.com/rbenv/rbenv#installation

install git
- https://sourceforge.net/projects/git-osx-installer/files/

Check out rbenv into ~/.rbenv.
- $ git clone https://github.com/rbenv/rbenv.git ~/.rbenv

Optionally, try to compile dynamic bash extension to speed up rbenv. Don't worry if it fails; rbenv will still work normally:
- $ cd ~/.rbenv && src/configure && make -C src

Add ~/.rbenv/bin to your $PATH for access to the rbenv command-line utility.
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile

Run ~/.rbenv/bin/rbenv init for shell-specific instructions on how to
initialize rbenv to enable shims and autocompletion.
# Load rbenv automatically by appending
# the following to ~/.bash_profile:
eval "$(rbenv init -)"

Restart shell and test
$ type rbenv
#=> "rbenv is a function"

Install ruby-build
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build 

List all available versions
$ rbenv install -l

install a ruby version
$ rbenv install 2.4.1

set up project
$ cd ~/work
$ git clone https://github.com/r509/r509.git
$ cd r509
$ rbenv version
$ rbenv local

set ruby version
$ rbenv local 2.4.1
$ rbenv local

initial ruby version setup
$ gem install bundler
$ gem env home

initial project setup
$ bundle install
$ bundle exec gem list
$ gem list 

setup project
$ cd ~/work
$ git clone https://github.com/r509/r509-ca-http.git
$ cd r509-ca-http
$ rbenv local 2.4.1

initial project setup
$ bundle install
setup project
$ cd ~/work
$ git clone https://github.com/r509/r509-middleware-validity.git
$ cd r509-middleware-validity
$ rbenv local 2.4.1

initial project setup
$ bundle install

setup project
$ cd ~/work
$ git clone https://github.com/r509/r509-middleware-certwriter.git
$ cd r509-middleware-certwriter
$ rbenv local 2.4.1

initial project setup
$ bundle install

initial redis download and setup
- instructions http://jasdeep.ca/2012/05/installing-redis-on-mac-os-x/
$ cd ~/work
$ tar xfz redis-3.2.8.tar.gz
$ cd redis-3.2.8
$ sudo make test
$ sudo make
$ sudo mv src/redis-server /usr/local/bin
$ sudo mv src/redis-cli /usr/local/bin
$ mkdir ~/.redis
$ touch ~/.redis/redis.conf
$ redis-server

initial binary project setup
$ mkdir ~/work/r509-howto-ca
$ cd ~/work/r509-howto-ca
$ rbenv local 2.4.1
$ bundle init
- edit Gemfile to include the followings
gem 'r509'
gem 'r509-ca-http'
gem 'r509-middleware-validity'
gem 'r509-middleware-certwriter'
$ bundle install


No comments:

Post a Comment