This is the Montreal.rb organization's website. It is still in development stage so you are welcome to contribute. You can join our Slack Team if you have any question, need some help to get started or just hang around with friendly people.
Want to contribute? First thing to look at are the Issues with the priority label. You can optionnally use Waffle.io to see the development pipeline used to manage the project.
- ruby 2.2.4
- Postgresql 9.3+
Fork the repository and clone it to your machine. Then change directory to Montreal.rb
$ git clone <your_fork> && cd Montreal.rb
You should have Ruby version 2.2.4
installed using your prefered Ruby version management tool (or by globally updating your system Ruby)
Most Popular Ruby Version Managers
You should also have bundler (minimum v1.10
) to help with tracking and installing the exact gems and versions that are needed.
Do you have Postgres installed?
$ postgres --version
Postgresql 9.3
For the next parts, you need Postgresql installed, configured and running and a
.pgpass
file in your home directory. The content of that file should look like:
# hostname:port:database:username:password
localhost:5432:*:sdeziel:myverysecurepassword
$ brew install postgresql
You should check out Ruby on Rails' guides if you are not familiar with the framework : http://guides.rubyonrails.org/
$ bin/setup
IMPORTANT: pg
gem installation error
If you experience an error during the execution of that script related to the installation of the pg
gem,
you might want to try the following procedure:
$ sudo find / -name "pg_config"
# Use the most appropriate path found by the command above
$ gem install pg -- --with-pg-config=<your_pg_config_path>
$ bin/setup
Once successfully completed, this setup script will:
- install
bundler
for managing your gem dependencies - install your project's required gems
- create and setup your database
- cleanup logs and temporary files
Set environment variables
Omniauth is used to allow users to log in to the site using GitHub accounts. To use the GitHub API, you must set environment variables for the GitHub 'key' and 'secret.'
You can first obtain this key/secret through your GitHub account.
For image hosting Cloudinary is used. This service gives us the ability to host images with a heroku app. Sign up for a free coludinary account.
Now you need to set the environment variables on your server. The procedure will depend on your system.
For development, copy .env.sample
file to .env
and fill appropriately the
variables settings.
If using Heroku, you can set the environment variables like this:
heroku config:add GITHUB_KEY=your_key GITHUB_SECRET=your_secret \
CLOUDINARY_URL=cloudinary://your_key:your_secret \
--app Montreal.rb
You should be ready to start your webserver using:
$ bin/rails server
By default, your application is accessible at http://localhost:3000 in your browser.
RSpec is used to test the application. You can run all the tests using
$ bin/rspec
or you can run a specific test file (example 1), or a single test (example 2, 17 is the line number of your test)
$ bin/rspec spec/path/to/your/file.rb # example 1
$ bin/rspec spec/path/to/your/file.rb:17 # example 2
You can also use guard to test automatically when you save a file
$ bundle exec guard
PROTIP: install ctags and guard will automatically generate an index (or tag) file of language objects found in source files that allows these items to be quickly and easily located by a text editor.
- ex: macos
brew install ctags && sudo mv /usr/bin/ctags /usr/bin/ctags.bak
- ex: ubuntu
sudo apt-get install exuberant-ctags
This application is automatically deployed to heroku after a successful Travis CI build of the master branch.
- The heroku url is: https://montreal-rb.herokuapp.com/
- The official url is: http://montrealrb.com/
If you find any bug, please open an issue in the project's Github repository (https://github.com/montrealrb/Montreal.rb/issues)
Please see CONTRIBUTING.md.
Everyone interacting in Montrealrb.com and its sub-projects' codebases, issue trackers, chat rooms, and mailing lists is expected to follow our code of conduct.
montrealrb.com is released under the MIT License.