forked from sinatra/sinatra-book
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
27 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,32 +11,43 @@ pushing to a remote git repository. | |
Steps to deploy to Heroku: | ||
|
||
* Create an [account](http://heroku.com/signup) if you don't have one | ||
* `gem install heroku` | ||
* Download and install [Heroku toolbelt](https://toolbelt.heroku.com/) | ||
* Make sure you have a `Gemfile`. Otherwise, you can create one and install the `sinatra` gem using `bundler`. | ||
* Make a config.ru in the root-directory | ||
* Create the app on heroku | ||
* Push to it | ||
|
||
1. Here is an example config.ru file that does two things. First, it requires | ||
1. Install `bundler` if you haven't yet (`gem install bundler`). Create a `Gemfile` using `bundle init`. Modify your `Gemfile` to look like: | ||
|
||
```ruby | ||
source 'http://rubygems.org' | ||
|
||
gem 'sinatra' | ||
``` | ||
|
||
Run `bundle` to install the gem. | ||
|
||
It is possible to specify a specific Ruby version on your Gemfile. | ||
For more information, check [this](https://devcenter.heroku.com/articles/ruby-versions). | ||
|
||
2. Here is an example config.ru file that does two things. First, it requires | ||
your main app file, whatever it's called. In the example, it will look for | ||
`myapp.rb`. Second, run your application. If you're subclassing, use the | ||
`myapp.rb`. Second, run your application. If you're subclassing, use the | ||
subclass's name, otherwise use Sinatra::Application. | ||
```ruby | ||
require "myapp" | ||
|
||
run Sinatra::Application | ||
``` | ||
```ruby | ||
require "myapp" | ||
2. Create the app and push to it | ||
run Sinatra::Application | ||
``` | ||
From the root-directory of the application | ||
3. Create the app and push to it | ||
``` | ||
$ heroku create <app-name> # This will add heroku as a remote | ||
$ git push heroku master | ||
``` | ||
From the root directory of the application, run these commands: | ||
For more details see [this](http://github.com/sinatra/heroku-sinatra-app) | ||
$ heroku create <app-name> # This will add heroku as a remote | ||
$ git push heroku master | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kgrz
|
||
[Heroku]: http://www.heroku.com | ||
For more details see [this](http://github.com/sinatra/heroku-sinatra-app). | ||
[Heroku]: http://www.heroku.com |
I think a space is missing here. Other than that, everything is okay.