http://blog.youkuaiyun.com/liuyanzhi08/article/details/7741060
This part I will lead you through the process of setting up RVM, GIT, MYSQL, VIM
Above all, lett's install some useful download tools:
aptitude : a better independence management tool than apt-get
axel : a fast multiply-lina downloader
apt-fast : use aptitude and axel to install sofware, it is awesome!
Then set up apt-fast follow the guaid
(1) Install the dependences
(2) Install the latest version of RVM , Ruby
(3) Add rvm function to bash
(4)Install ruby and generate ri-file for the newly installed ruby (so you can use "ri xx" to reffer to the ruby api)
(5) Configure gem not to generate ri and rdoc files, add the following line to ~/.gemrc
(6) Create gemset
(7) Install rails
encoding: utf8
reconnect: false
database: myapp_development
pool: 5
username: root
password: xxxx
socket: /var/run/mysqld/mysqld.sock
(10) Configure git
git config --global user.email your-git-email-address
(11) Create a git repot and push it to github
Then go to github, click "Create a New Repot"
Fill in the name and then create
You get this line :
Flash the github page, you will see your codes already uploaded
(12)Publish on heruku
As with GitHub, when using Heroku you will need to create SSH keys if you haven’t already, and then tell Heroku your public key so that you can use Git to push the sample application repository up to their servers: ( ref => http://ruby.railstutorial.org/chapters/beginning?version=3.2#sec:1.4.1 )
Add to Gemfile:
Thengroup :prodcution do gem 'activerecord-postgresql-adapter' end
bundle install
gem install herokuheroku keys:addheroku create --stack cedargit push heroku masterheroku rake db:migrateheroku open
(13) Configure vim for rails ( The janus : https://github.com/carlhuda/janus )
curl -Lo- https://bit.ly/janus-bootstrap | bash
g Highly recommed the railscasts colorscheme
Ibus input method is confict with gvim, to handle it do the following:
echo 'alias gvim="gvim -f"' >> ~/.bashrcsource ~/.bashrc