diff options
| author | RobertDober | 2017-04-03 18:29:17 +0200 |
|---|---|---|
| committer | RobertDober | 2017-04-04 10:08:08 +0200 |
| commit | 2a682f54f583a985809ba9ba1e33a1608f9f63b0 (patch) | |
| tree | 5e5cf1b9081d5b5df320775147de657a5103fd97 | |
| parent | 87e2ed2375a5fdfc85f42a632cff48168ac22af7 (diff) | |
| download | chouette-core-2a682f54f583a985809ba9ba1e33a1608f9f63b0.tar.bz2 | |
Fixes and Refs: #3030, INSTALL.md added
| -rw-r--r-- | INSTALL.md | 70 | ||||
| -rw-r--r-- | db/schema.rb | 8 |
2 files changed, 76 insertions, 2 deletions
diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 000000000..16514d5c4 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,70 @@ +# Installation Guide + +This guide is based on mac/OS with [Homebrew](https://brew.sh/) and [RVM](https://rvm.io/) + +## Ruby + +Get a correct `.ruby-version` (Can we remove it from `.gitignore`?) +and install that version. + +Example with [rvm](https://rvm.io/): + + rvm install 2.3.0 + +Add the bundler gem + + gem install bundler + +Go into your local repro and install the gems + + bundle + +### Caveats + +`libv8` might cause you troubles, depending on your local configuration. If you have `libv8` installed (probably because of `node.js`) you might need to tell bundler/Rubygems to use the system version. + + + bundle config build.libv8 --with-system-v8 + bundle + +or + gem install libv8 -v '<version>' -- --with-system-v8 + bundle + +You will get the correct value of `<version>` from bundler's error message. + +## Rails + +### Dependencies + +As documented [here](https://github.com/dryade/georuby-ext/issues/2) we need some more libs before we can start the `rake` setup tasks. On mac/OS the easiest way is just to install `postgis` now with `homebrew` as this will +install all needed libraries. + +### Postgres + +#### Create user + + createuser -s -U $USER -P chouette + ^ ^ ^ + | | +---- prompt for passwd + | +----- as your default postgres user (remove in case of different config) + +---------- superuser + +When promted for the password enter the highly secure string `chouette`. + + +#### Create database + + bundle exec rake db:migrate + RAILS_ENV=test bundle exec rake db:migrate + +#### Install node.js packages + + bundle exec rake npm:install + +### SSO Configuration + +Get yourself an invitation to [Stif Portail](http://stif-portail-dev.af83.priv/) and be sure to update your information +on your [profile page](http://stif-portail-dev.af83.priv/users/edit) + + diff --git a/db/schema.rb b/db/schema.rb index 027079611..a6b237542 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -514,10 +514,10 @@ ActiveRecord::Schema.define(version: 20170322075010) do t.string "objectid", null: false t.integer "object_version", limit: 8 t.string "creator_id" - t.float "distance" - t.boolean "no_processing" t.spatial "input_geometry", limit: {:srid=>4326, :type=>"line_string"} t.spatial "processed_geometry", limit: {:srid=>4326, :type=>"line_string"} + t.float "distance" + t.boolean "no_processing" t.datetime "created_at" t.datetime "updated_at" end @@ -825,6 +825,8 @@ ActiveRecord::Schema.define(version: 20170322075010) do add_index "workbenches", ["stop_area_referential_id"], :name => "index_workbenches_on_stop_area_referential_id" Foreigner.load + add_foreign_key "access_links", "access_points", name: "aclk_acpt_fkey", dependent: :delete + add_foreign_key "group_of_lines_lines", "group_of_lines", name: "groupofline_group_fkey", dependent: :delete add_foreign_key "journey_frequencies", "timebands", name: "journey_frequencies_timeband_id_fk", dependent: :nullify @@ -847,6 +849,8 @@ ActiveRecord::Schema.define(version: 20170322075010) do add_foreign_key "stop_areas_stop_areas", "stop_areas", name: "stoparea_child_fkey", column: "child_id", dependent: :delete add_foreign_key "stop_areas_stop_areas", "stop_areas", name: "stoparea_parent_fkey", column: "parent_id", dependent: :delete + add_foreign_key "stop_points", "routes", name: "stoppoint_route_fkey", dependent: :delete + add_foreign_key "time_table_dates", "time_tables", name: "tm_date_fkey", dependent: :delete add_foreign_key "time_table_periods", "time_tables", name: "tm_period_fkey", dependent: :delete |
