My Heroku (Meroku), because hosting 100 apps costs $700 ($7x100) at heroku.com
Ruby on Rails is a popular web framework written in Ruby. This guide covers using Rails 5 on Meroku. To follow along, you need
-
Basic Ruby/Rails knowledge.
-
A locally installed version of Ruby 2.4.2+, Rubygems, Bundler, and Rails 5+.
-
Basic Git knowledge.
Install the meroku gem on your local workstation
$ gem install meroku
Once installed, you’ll have access to the $ meroku
command
from your command shell.
$ meroku signup # if you haven't done already
Make sure you're running the latest version of ruby
$ cd ~; ruby --version
ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-darwin16]
Install the rails gem if you haven't done already
$ gem install rails --no-ri --no-rdoc
Successfully installed rails-5.1.4
1 gem installed
Then create a new app:
$ rails new myapp --database=postgresql
Then move into your application directory.
$ cd myapp
Mention you want to the latest ruby version
$ echo "2.4.2" > .ruby-version
And commit it
$ git add --all; git commit -m "Added ruby version";
Register your application with meroku
$ meroku create
Creating app... done
Add your public key to meroku
$ meroku keys:add
And deploy
$ git push meroku master
$ meroku run rake db:migrate
DOCUMENTATION FOR MAINTAINERS
Prereqs
You will need a copy of the file .secret
. Place it at
~/.meroku/.secret
Commands
$ meroku infrastructure spawn
$ meroku infrastructure despawn
$ rubocop -D -F --except FrozenStringLiteralComment,StringLiterals,MutableConstant lib/
Inspecting 15 files
...............
15 files inspected, no offenses detected
$
TODO
- Only latest stable ruby is supported at the moment
- Only latest stable rails is supported at the moment
- Only RAILS_ENV=procution is supported at the moment
- Only puma is supported at the moment
To Run tests
rake