Monday, April 20, 2015

Start Ruby on Rails!

Installing Ruby on Rails on Mac OS X Yosemite

1. Install latest Xcoder (6.3)

2. Install Command Line Tools which is premise for step 6:
    Xcoder -> Open Developer Tool -> More Developer Tools...

3. Install RVM:
    $ curl -L https://get.rvm.io | bash -s stable

4. Install latest ruby (2.2.1):
    $ rvm install 2.2.1 --autolibs=enable

5. Configure the environment to be ruby 2.2.1:
    $ rvm use 2.2.1

6. Install latest rails (4.2.1)
    $ gem install rails --version 4.2.1 (--no-ri --no-rdoc)

7. Make ruby 2.2.1 as the default environment
    $ rvm --default 2.2.1

After installation, there might be something that you would like to do, such as upgrade to newer version.
1. To find out all the versions of Rails that you have installed:
    $ gem list --local rails

Installing PostgreSQL on Mac OS X Yosemite
1. www.postgresql.org/download/macosx/  find a installer on the website and install PostgreSQL.
2. Install the database driver for PostgreSQL. Driver can be downloaded from https://bitbucket.org/ged/ruby-pg/wiki/Home. You have to specify the pg_config location. PostgreSQL installed by EnterpriseDB keeps pg_config in /Library/PostgreSQL/9.4/bin/pg_config
$gem install pg -- --with-pg-config=/Library/PostgreSQL/9.4/bin/pg_config

To be continued:
1. Version Control (Git) ?
2. Continuous integration (CI) system?
3. Editors?

No comments:

Post a Comment