A barebones Rails app, which can easily be deployed to Heroku.
This application supports the Getting Started on Heroku with Ruby article - check it out.
Make sure you have Ruby installed. Also, install the Heroku CLI (formerly known as the Heroku Toolbelt).
$ git clone git@github.com:heroku/ruby-getting-started.git
$ cd ruby-getting-started
$ bundle install
$ bundle exec rake db:create db:migrate
$ heroku local
Your app should now be running on localhost:5000.
Using resources for this example app counts towards your usage. Delete your app and database as soon as you are done experimenting to control costs.
By default, apps use Eco dynos if you are subscribed to Eco. Otherwise, it defaults to Basic dynos. The Eco dynos plan is shared across all Eco dynos in your account and is recommended if you plan on deploying many small apps to Heroku. Learn more about our low-cost plans here.
Eligible students can apply for platform credits through our new Heroku for GitHub Students program.
Ensure you're in the correct directory:
$ ls
Gemfile Procfile Rakefile app.json config db log public tmp
Gemfile.lock README.md app bin config.ru lib package.json test vendor
You should see a Gemfile
file. Then run:
$ heroku create
$ git push heroku main
$ heroku run rake db:migrate
$ heroku open
or
For more information about using Ruby on Heroku, see these Dev Center articles: