ODHK / OpenDataHK.com

The Code behind OpenDataHK.com
9 stars 4 forks source link

Document Dev Environment Setup #29

Open tijptjik opened 11 years ago

denistsoi commented 11 years ago

There's a few things to note while setting up this repo:

Firstly, Are you using Windows, Mac or Linux?

If you're a Mac, things get a bit difficult - but fear not! - for the Terminal is here! You're Terminal is a very stupid stupid buddy, think Patrick from Spongebob.

We'll be using ruby 1.9.3 and rails 3.x.x

[http://railsapps.github.io/installing-rails.html] rails installation for mac

Have yourself install the following:

  1. rvm: $ \curl -L https://get.rvm.io | bash -s stable --ruby
  2. ruby 1.9.3:
    $ rvm get stable --autolibs=enable
    $ rvm install ruby
    $ rvm --default use ruby-2.0.0-p247

Then install

kithokit commented 11 years ago

not recommend you to use ruby 2.0, as there will be some difference between 1.9.3

denistsoi commented 11 years ago

Do NOT use 2.0?

I've also noticed that this build was meant for linux -

kithokit commented 11 years ago

not necessary for linux, as RoR is a cross platform application indeed.

the default is using ruby 1.9.3 , better use ruby 1.9 install of 2.0

both linux and mac are *nix-based. There may be some native library are not the same but basically both should be able to setup

I did using mac setting up successfully, just using sqlite3 as my local db server

denistsoi commented 11 years ago

I know RoR is cross platform - however, there are dependancies which flag errors with Windows & Mac OSX

So I should be using ruby 1.9 with rails 2.0? or just ruby 1.9?

kithokit commented 11 years ago

the rails installation is included in the Gemfile already. what you need is that

go to the project of the root directory

cd ~/Opendata

rvm gemset create opendata (create a gemset) rvm use ruby-1.9.3-pxxx (there may be varies version of ruby 1.9.3) bundle install (it will help install everything including rails)

denistsoi commented 11 years ago

Did that already Kit, the rails server command is failing to build~ (ill update later)

Denis Tsoi

Dim Sum Labs Community Organizer

On Tue, Aug 6, 2013 at 10:54 AM, Kit Ho notifications@github.com wrote:

the rails installation is included in the Gemfile already. what you need is that go to the project of the root directory cd ~/Opendata rvm gemset create opendata (create a gemset) rvm use ruby-1.9.3-pxxx (there may be varies version of ruby 1.9.3)

bundle install (it will help install everything including rails)

Reply to this email directly or view it on GitHub: https://github.com/ODHK/OpenDataHK.com/issues/29#issuecomment-22155414

tijptjik commented 11 years ago

Did you bundle install complete successfully without any error then?