This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: bundle exec rails s | |
webpacker: NODE_ENV=production ./bin/webpack --watch --colors --progress |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
query = "SELECT Sum(score) AS score, | |
Sum(range) AS range | |
FROM best_results br | |
JOIN chapters c | |
ON br.chapter_id = c.id | |
JOIN lessons l | |
ON c.lesson_id = l.id | |
JOIN units u | |
ON l.unit_id = u.id | |
WHERE br.user_id = '#{user.id}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Check rails version | |
$ rails -v | |
- To update rails | |
$ gem update rails | |
- Creating a new rails app using postgresql | |
$ mkdir rails_projects | |
$ cd rails_projects | |
$ rails new myapp --database=postgresql |