Skip to content

Windows install instructions

Mike Ralphson edited this page May 6, 2016 · 3 revisions

Draft

Please note these instructions are based on Windows 10 32-bit, with Ruby 2.2 installed via the RailsInstaller package. They are enough to get a copy of the Morph.io website up and running for local development. Do not expect to be able to run/schedule scrapers at this stage.

  1. Clone the git repository
  2. Install mysql and the C connector for same version (e.g. MySQL 5.7)
  3. Edit Gemfile to include gem 'tzinfo-data'
  4. Edit ruby/rails.cmd files to remove hard-coded developer paths
  5. bundle install
  6. SET RAILS_ENV=test
  7. Copy config/database.yml.example to config/database.yml and edit defaults, as per README.md
  8. Create github application for authorisation purposes, as per README.md
  9. rake db:create
  10. rake db:migrate
  11. rails server

Detailed instructions per step

Step 2

If you are running on a large disc (over 2TB) or on an SSD, you may need to edit your my.ini file to include innodb_flush_method=normal during installation, otherwise the MySQL service may not start. See MySQL Bug #28913

Step 4

https://github.com/railsinstaller/railsinstaller-windows/issues/70

Step 5

You may need to build the mysql2 Ruby gem with a command-line similar to:

gem install mysql2 --version '0.3.18' --platform=ruby -- --with-mysql-dir=C:/path/to/mysql/c-connector

Follow the same recipe for any other Gems which fail to build due to missing local headers, e.g. Sqlite3

Hope not to trigger this bundler bug: https://github.com/bundler/bundler/issues/2101

Step 6

This is to avoid having to load the rack-mini-profiler Gem, which appears to have problems on Windows. http://community.miniprofiler.com/t/rails-no-such-file-to-load-rack-mini-profiler-loaderror/85/4

Step 11

Foreman appears also to have problems on Windows, as detailed in this pull-request

Current status

Working up until Github auth comes back.

http://127.0.0.1:3000/users/auth/github/callback?code={code}&state={state}

The 127.0.0.1 page isn’t working

127.0.0.1 didn’t send any data.
ERR_EMPTY_RESPONSE
Puma 2.11.1 starting...
* Min threads: 0, max threads: 16
* Environment: test
* Listening on tcp://0.0.0.0:3000
I, [2016-05-06T14:48:22.981322 #1544]  INFO -- omniauth: (github) Request phase initiated.
I, [2016-05-06T14:48:23.593462 #1544]  INFO -- omniauth: (github) Callback phase initiated.
I, [2016-05-06T14:48:23.663484 #1544]  INFO -- omniauth: (github) Callback phase initiated.
I, [2016-05-06T14:48:23.730505 #1544]  INFO -- omniauth: (github) Callback phase initiated.
I, [2016-05-06T14:48:24.053480 #1544]  INFO -- omniauth: (github) Callback phase initiated.
I, [2016-05-06T14:48:29.218677 #1544]  INFO -- omniauth: (github) Callback phase initiated.
I, [2016-05-06T14:48:59.337696 #1544]  INFO -- omniauth: (github) Callback phase initiated.
I, [2016-05-06T14:49:59.473620 #1544]  INFO -- omniauth: (github) Callback phase initiated.