# export the database
# use gem 'seed_dump'
# which writes all your data into db/seeds.rb
rake db:seed:dump
# import the database
# upload seeds.rb to server- Use macvim
brew install macvim --override-system-vim
or install without macvim- brew install mercurial
- brew install vim
- Setup your vim to use vundle to install bundles: https://github.com/gmarik/vundle
Learning ruby
http://rubymonk.com/
12 factors that make an app good
http://12factor.net/
Rails Guide
http://guides.rubyonrails.org/
- Assuming the gem is called rulers
bundle gem rulers
# edit rulers/rulers.gemspec to add your profile information to the gem
# Build and install the gem
gem build rulers.gemspec
gem install rulers-0.0.1.gem# Files in the config/locales directory are used for internationalization
# and are automatically loaded by Rails. If you want to use locales other
# than English, add the necessary files in this directory.
#
# To use the locales, use `I18n.t`:
#
# I18n.t 'hello'
#
# In views, this is aliased to just `t`:This guide setup Apache2/Passenger/Ruby/Rails on a CentOS 6.4 LiveCD.
You can test it yourself using VirtualBox to run all the scripts - read VirtualBox.md for more info.
# install the necessary libraries
yum clean all
yum -y update
yum -y install curl-devel git sqlite-devel libxml2-devel
yum -y install libxml2 libxml2-devel libxslt libxslt-devel
yum -y install gcc-c++ readline-devel libyaml-devel libffi-devel openssl-devel libtool bisonThis guide shows the step to setup VirtualBox with CentOS 6 for your testing of deployment scripts on Rails.
- You are using Mac
- VirtualBox is a virtual machine that will run your CentOS and acts as a separate machine
- Follow the guide from http://opensourcedbms.com/dbms/installing-cent-os-6-3-linux-in-oracle-virtual-box-ssh-access/ to install and setup your CentOS with the following exceptions:
- Skip the steps on editing
/etc/sysconfig/network-scripts/ifcfg-eth0and setting up of SSH
- Skip the steps on editing
- Use CentOS 6.4 (64-bits) instead of 6.3
This guide explains the way to setup a production server using Capistrano.
- CentOS 6
- Root access with SSH
- depot is the assumed name of the project in this guide. Please change it to your own project name.
- Server is installed with Apache/Passenger/Bundler/RVM.
Please refer to Server Setup.md gist for info on how to set it up.