- Clone the repository by running
git clone [email protected]:Wolox/rails-interview-likes.git
- Go to the project root by running
cd rails-interview-likes
- Download and install Rbenv.
- Download and install Ruby-Build.
- Install the appropriate Ruby version by running
rbenv install [version]
whereversion
is the one located in .ruby-version
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt remove cmdtest # Some Ubuntu systems comes with cmdtest installed by default.
sudo apt-get update && sudo apt-get install yarn
- Install Bundler.
gem install bundler --no-ri --no-rdoc
rbenv rehash
- Install basic dependencies if you are using Ubuntu:
sudo apt-get install build-essential libpq-dev nodejs
- Install all the gems included in the project.
bundle install
Run in terminal:
sudo -u postgres psql
CREATE ROLE "rails-interview-likes" LOGIN CREATEDB PASSWORD 'rails-interview-likes';
Log out from postgres and run:
bundle exec rake db:create db:migrate
Your server is ready to run. You can do this by executing rails server
and going to http://localhost:3000. Happy coding!
We use dotenv to set up our environment variables in combination with secrets.yml
.
For example, you could have the following secrets.yml
:
production: &production
foo: <%= ENV['FOO'] %>
bar: <%= ENV['BAR'] %>
and a .env
file in the project root that looks like this:
FOO=1
BAR=2
When you load up your application, Rails.application.secrets.foo
will equal ENV['FOO']
, making your environment variables reachable across your Rails app.
The .env
will be ignored by git
so it won't be pushed into the repository, thus keeping your tokens and passwords safe.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Run rspec tests (
bundle exec rspec spec -fd
) - Run scss lint (
bundle exec scss-lint app/assets/stylesheets/
) - Run rubocop lint (
bundle exec rubocop app spec -R
) - Push your branch (
git push origin my-new-feature
) - Create a new Pull Request
This project is maintained by Nicolas Zarewsky and Federico Esteban and it is written by Wolox.