Skip to content

Instantly share code, notes, and snippets.

@ngsw
Created January 29, 2012 18:01
Show Gist options
  • Save ngsw/1699869 to your computer and use it in GitHub Desktop.
Save ngsw/1699869 to your computer and use it in GitHub Desktop.
Scientific Linux 6.1 yum_setup & rbenv
yum install readline-devel.x86_64 libyaml.x86_64 tree nkf
yum install mysql mysql-server git
yum install readline-devel.x86_64 libyaml.x86_64 openssl-devel.x86_64 mysql-devel.x86_64
yum install gcc make zlib-devel gcc-c++
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $HOME/.bashrc
echo 'eval "$(rbenv init -)"' >> $HOME/.bashrc
echo "source ~/.rbenv/completions/rbenv.bash" >> $HOME/.bashrc
cd $HOME
git clone git://github.com/sstephenson/ruby-build.git
cd $HOME/ruby-build
sudo ./install.sh
rbenv-install 1.9.3-p0
rbenv global 1.9.3-p0
rbenv rehash
rbenv versions
rbenv exec gem install rails pry pry-doc
cd /path/to/railsdir/
cat << EOS > Gemfile
source "http://rubygems.org"
gem "rails", '~>3.2.0.rc2'
EOS
bundle install --path vendor/bundle
bundle exec rails new railsapp -d mysql
rm -f Gemfile
rm -f Gemfile.lock
rm -rf .bundle
cd railsapp
#Gemfile追記 gem 'therubyracer'
bundle install --path vendor/bundle
bundle exec rails g scaffold post title:string body:text
@ngsw
Copy link
Author

ngsw commented Jan 29, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment