在Ubuntu 12.10下配置Ruby on Rails开发环境笔记。
//首先系统更新
//对于Ubuntu系统最好把软件源改为mirrors.163.com的
sudo apt-get update
sudo apt-get upgrade
//安装sublime
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
//安装必要的套件
sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev
//安装ruby –深度linux
sudo apt-get install rails1.9.3
//安装ruby –ubuntu
\curl -L https://get.rvm.io | bash -s stable –ruby
//安装rails
sudo gem install rails(对于ubuntu可先不用sudo试试)
//安装sqlite3
sudo gem install sqlite3(对于ubuntu可先不用sudo试试)
//安装git
sudo apt-get install git
git config –global user.name “你的用户名”
git config –global user.email “你的邮箱”
//生成ssh key
//具体参考 https://help.github.com/articles/generating-ssh-keys
ssh-keygen -t rsa -C “此处输入你的邮箱地址”
/home/you/.ssh/id_rsa //you是你的用户名,该文件夹用来保存ssh key
输入密码:(可不输)
后面的参照该网页教程
在https://github.com/上申请一个帐号
用户名和邮箱都必须是刚刚输过的
rails server错误:
sudo apt-get install Python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs