First walkthrough done.
This commit is contained in:
parent
eb73fe095f
commit
a43f41fab9
57
README.md
57
README.md
|
@ -1995,34 +1995,40 @@ implementation.
|
|||
Sinatra currently doesn't run on Cardinal, SmallRuby, BlueRuby or any
|
||||
Ruby version prior to 1.8.7.
|
||||
|
||||
== The Bleeding Edge
|
||||
## The Bleeding Edge
|
||||
|
||||
If you would like to use Sinatra's latest bleeding-edge code, feel free to run your
|
||||
application against the master branch, it should be rather stable.
|
||||
|
||||
We also push out prerelease gems from time to time, so you can do a
|
||||
|
||||
```ruby
|
||||
gem install sinatra --pre
|
||||
```
|
||||
|
||||
To get some of the latest features.
|
||||
|
||||
=== With Bundler
|
||||
### With Bundler
|
||||
|
||||
If you want to run your application with the latest Sinatra, using
|
||||
{Bundler}[http://gembundler.com/] is the recommended way.
|
||||
[Bundler](http://gembundler.com/) is the recommended way.
|
||||
|
||||
First, install bundler, if you haven't:
|
||||
|
||||
```ruby
|
||||
gem install bundler
|
||||
```
|
||||
|
||||
Then, in your project directory, create a +Gemfile+:
|
||||
Then, in your project directory, create a `Gemfile`:
|
||||
|
||||
```ruby
|
||||
source :rubygems
|
||||
gem 'sinatra', :git => "git://github.com/sinatra/sinatra.git"
|
||||
|
||||
# other dependencies
|
||||
gem 'haml' # for instance, if you use haml
|
||||
gem 'activerecord', '~> 3.0' # maybe you also need ActiveRecord 3.x
|
||||
```
|
||||
|
||||
Note that you will have to list all your application's dependencies in the +Gemfile+.
|
||||
Sinatra's direct dependencies (Rack and Tilt) will, however, be automatically
|
||||
|
@ -2030,54 +2036,63 @@ fetched and added by Bundler.
|
|||
|
||||
Now you can run your app like this:
|
||||
|
||||
```ruby
|
||||
bundle exec ruby myapp.rb
|
||||
```
|
||||
|
||||
=== Roll Your Own
|
||||
### Roll Your Own
|
||||
|
||||
Create a local clone and run your app with the `sinatra/lib` directory
|
||||
on the `$LOAD_PATH`:
|
||||
|
||||
```ruby
|
||||
cd myapp
|
||||
git clone git://github.com/sinatra/sinatra.git
|
||||
ruby -Isinatra/lib myapp.rb
|
||||
```
|
||||
|
||||
To update the Sinatra sources in the future:
|
||||
|
||||
```ruby
|
||||
cd myapp/sinatra
|
||||
git pull
|
||||
|
||||
=== Install Globally
|
||||
```
|
||||
### Install Globally
|
||||
|
||||
You can build the gem on your own:
|
||||
|
||||
```ruby
|
||||
git clone git://github.com/sinatra/sinatra.git
|
||||
cd sinatra
|
||||
rake sinatra.gemspec
|
||||
rake install
|
||||
```
|
||||
|
||||
If you install gems as root, the last step should be
|
||||
|
||||
```ruby
|
||||
sudo rake install
|
||||
```
|
||||
|
||||
== Versioning
|
||||
## Versioning
|
||||
|
||||
Sinatra follows {Semantic Versioning}[http://semver.org/], both SemVer and
|
||||
Sinatra follows [Semantic Versioning](http://semver.org/), both SemVer and
|
||||
SemVerTag.
|
||||
|
||||
== Further Reading
|
||||
## Further Reading
|
||||
|
||||
* {Project Website}[http://www.sinatrarb.com/] - Additional documentation,
|
||||
* [Project Website](http://www.sinatrarb.com/) - Additional documentation,
|
||||
news, and links to other resources.
|
||||
* {Contributing}[http://www.sinatrarb.com/contributing] - Find a bug? Need
|
||||
* [Contributing](http://www.sinatrarb.com/contributing) - Find a bug? Need
|
||||
help? Have a patch?
|
||||
* {Issue tracker}[http://github.com/sinatra/sinatra/issues]
|
||||
* {Twitter}[http://twitter.com/sinatra]
|
||||
* {Mailing List}[http://groups.google.com/group/sinatrarb/topics]
|
||||
* {IRC: #sinatra}[irc://chat.freenode.net/#sinatra] on http://freenode.net
|
||||
* {Sinatra Book}[http://sinatra-book.gittr.com] Cookbook Tutorial
|
||||
* {Sinatra Recipes}[http://recipes.sinatrarb.com/] Community
|
||||
* [Issue tracker](http://github.com/sinatra/sinatra/issues)
|
||||
* [Twitter][http://twitter.com/sinatra)
|
||||
* [Mailing List](http://groups.google.com/group/sinatrarb/topics)
|
||||
* [IRC: #sinatra](irc://chat.freenode.net/#sinatra) on http://freenode.net
|
||||
* [Sinatra Book](http://sinatra-book.gittr.com) Cookbook Tutorial
|
||||
* [Sinatra Recipes](http://recipes.sinatrarb.com/) Community
|
||||
contributed recipes
|
||||
* API documentation for the {latest release}[http://rubydoc.info/gems/sinatra]
|
||||
or the {current HEAD}[http://rubydoc.info/github/sinatra/sinatra] on
|
||||
* API documentation for the [latest release](http://rubydoc.info/gems/sinatra)
|
||||
or the [current HEAD](http://rubydoc.info/github/sinatra/sinatra) on
|
||||
http://rubydoc.info
|
||||
* {CI server}[http://travis-ci.org/sinatra/sinatra]
|
||||
* [CI server](http://travis-ci.org/sinatra/sinatra)
|
||||
|
|
Loading…
Reference in New Issue