Install dependencies for a Ruby on Rails application:
ruby(install via rbenv the version specified in the Gemfile)bundlerrailsmysqlmailcatcher
Add the following environment variable(s) to your profile, modifying value(s) as desired:
export GTFS_SOURCE_URL="http://www.shorelineeast.com/google_transit.zip"Obtain source code:
git clone git@github.com:data-creative/next-train.git
cd next-trainInstall gem dependencies.
bundle install --without productionCreate database user:
mysql -uroot -p
mysql> CREATE USER 'next_train'@'localhost' IDENTIFIED BY 'next_train';
mysql> GRANT ALL ON *.* to 'next_train'@'localhost';
mysql> exitCreate database:
bundle exec rake db:create
bundle exec rake db:migratePopulate database:
bundle exec rake db:seed
bundle exec rake gtfs:importStart development web server:
rails sThen view in browser at localhost:3000.
Start a local mail server:
mailcatcherStart development console:
rails cPrepare test environment database:
bundle exec rake db:test:prepareRun tests:
bundle exec rspec specGenerate test coverage report:
COVERAGE=true bundle exec rspec spec