First walkthrough done.
This commit is contained in:
parent
eb73fe095f
commit
a43f41fab9
103
README.md
103
README.md
|
@ -1940,7 +1940,7 @@ Options are:
|
||||||
|
|
||||||
The following Ruby versions are officially supported:
|
The following Ruby versions are officially supported:
|
||||||
|
|
||||||
** Ruby 1.8.7 **
|
**Ruby 1.8.7**
|
||||||
> 1.8.7 is fully supported, however, if nothing is keeping you from it, we
|
> 1.8.7 is fully supported, however, if nothing is keeping you from it, we
|
||||||
recommend upgrading to 1.9.2 or switching to JRuby or Rubinius. Support for
|
recommend upgrading to 1.9.2 or switching to JRuby or Rubinius. Support for
|
||||||
1.8.7 will not be dropped before Sinatra 2.0 and Ruby 2.0 except maybe in
|
1.8.7 will not be dropped before Sinatra 2.0 and Ruby 2.0 except maybe in
|
||||||
|
@ -1949,22 +1949,22 @@ The following Ruby versions are officially supported:
|
||||||
with 1.8.6, downgrade to Sinatra 1.2, which will receive bug fixes until
|
with 1.8.6, downgrade to Sinatra 1.2, which will receive bug fixes until
|
||||||
Sinatra 1.4.0 is released.
|
Sinatra 1.4.0 is released.
|
||||||
|
|
||||||
** Ruby 1.9.2 **
|
**Ruby 1.9.2**
|
||||||
> 1.9.2 is fully supported and recommended. Do not use 1.9.2p0, as it is known to
|
> 1.9.2 is fully supported and recommended. Do not use 1.9.2p0, as it is known to
|
||||||
cause segmentation faults when running Sinatra. Support will continue at least
|
cause segmentation faults when running Sinatra. Support will continue at least
|
||||||
until the release of Ruby 1.9.4/2.0 and support for the latest 1.9 release
|
until the release of Ruby 1.9.4/2.0 and support for the latest 1.9 release
|
||||||
will continue as long as it is still supported by the Ruby core team.
|
will continue as long as it is still supported by the Ruby core team.
|
||||||
|
|
||||||
** Ruby 1.9.3 **
|
**Ruby 1.9.3**
|
||||||
> 1.9.3 is fully supported and recommended. Please note that switching to 1.9.3
|
> 1.9.3 is fully supported and recommended. Please note that switching to 1.9.3
|
||||||
from an earlier version will invalidate all sessions.
|
from an earlier version will invalidate all sessions.
|
||||||
|
|
||||||
** Rubinius **
|
**Rubinius**
|
||||||
> Rubinius is officially supported (Rubinius >= 1.2.4), everything works, including
|
> Rubinius is officially supported (Rubinius >= 1.2.4), everything works, including
|
||||||
all template languages. The upcoming 2.0 release is supported as
|
all template languages. The upcoming 2.0 release is supported as
|
||||||
well, including 1.9 mode.
|
well, including 1.9 mode.
|
||||||
|
|
||||||
** JRuby **
|
**JRuby**
|
||||||
> JRuby is officially supported (JRuby >= 1.6.7). No issues with third party
|
> JRuby is officially supported (JRuby >= 1.6.7). No issues with third party
|
||||||
template libraries are known, however, if you choose to use JRuby, please
|
template libraries are known, however, if you choose to use JRuby, please
|
||||||
look into JRuby rack handlers, as the Thin web server is not fully supported
|
look into JRuby rack handlers, as the Thin web server is not fully supported
|
||||||
|
@ -1995,34 +1995,40 @@ implementation.
|
||||||
Sinatra currently doesn't run on Cardinal, SmallRuby, BlueRuby or any
|
Sinatra currently doesn't run on Cardinal, SmallRuby, BlueRuby or any
|
||||||
Ruby version prior to 1.8.7.
|
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
|
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.
|
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
|
We also push out prerelease gems from time to time, so you can do a
|
||||||
|
|
||||||
gem install sinatra --pre
|
```ruby
|
||||||
|
gem install sinatra --pre
|
||||||
|
```
|
||||||
|
|
||||||
To get some of the latest features.
|
To get some of the latest features.
|
||||||
|
|
||||||
=== With Bundler
|
### With Bundler
|
||||||
|
|
||||||
If you want to run your application with the latest Sinatra, using
|
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:
|
First, install bundler, if you haven't:
|
||||||
|
|
||||||
gem install bundler
|
```ruby
|
||||||
|
gem install bundler
|
||||||
|
```
|
||||||
|
|
||||||
Then, in your project directory, create a +Gemfile+:
|
Then, in your project directory, create a `Gemfile`:
|
||||||
|
|
||||||
source :rubygems
|
```ruby
|
||||||
gem 'sinatra', :git => "git://github.com/sinatra/sinatra.git"
|
source :rubygems
|
||||||
|
gem 'sinatra', :git => "git://github.com/sinatra/sinatra.git"
|
||||||
|
|
||||||
# other dependencies
|
# other dependencies
|
||||||
gem 'haml' # for instance, if you use haml
|
gem 'haml' # for instance, if you use haml
|
||||||
gem 'activerecord', '~> 3.0' # maybe you also need ActiveRecord 3.x
|
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+.
|
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
|
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:
|
Now you can run your app like this:
|
||||||
|
|
||||||
bundle exec ruby myapp.rb
|
```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
|
Create a local clone and run your app with the `sinatra/lib` directory
|
||||||
on the `$LOAD_PATH`:
|
on the `$LOAD_PATH`:
|
||||||
|
|
||||||
cd myapp
|
```ruby
|
||||||
git clone git://github.com/sinatra/sinatra.git
|
cd myapp
|
||||||
ruby -Isinatra/lib myapp.rb
|
git clone git://github.com/sinatra/sinatra.git
|
||||||
|
ruby -Isinatra/lib myapp.rb
|
||||||
|
```
|
||||||
|
|
||||||
To update the Sinatra sources in the future:
|
To update the Sinatra sources in the future:
|
||||||
|
|
||||||
cd myapp/sinatra
|
```ruby
|
||||||
git pull
|
cd myapp/sinatra
|
||||||
|
git pull
|
||||||
=== Install Globally
|
```
|
||||||
|
### Install Globally
|
||||||
|
|
||||||
You can build the gem on your own:
|
You can build the gem on your own:
|
||||||
|
|
||||||
git clone git://github.com/sinatra/sinatra.git
|
```ruby
|
||||||
cd sinatra
|
git clone git://github.com/sinatra/sinatra.git
|
||||||
rake sinatra.gemspec
|
cd sinatra
|
||||||
rake install
|
rake sinatra.gemspec
|
||||||
|
rake install
|
||||||
|
```
|
||||||
|
|
||||||
If you install gems as root, the last step should be
|
If you install gems as root, the last step should be
|
||||||
|
|
||||||
sudo rake install
|
```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.
|
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.
|
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?
|
help? Have a patch?
|
||||||
* {Issue tracker}[http://github.com/sinatra/sinatra/issues]
|
* [Issue tracker](http://github.com/sinatra/sinatra/issues)
|
||||||
* {Twitter}[http://twitter.com/sinatra]
|
* [Twitter][http://twitter.com/sinatra)
|
||||||
* {Mailing List}[http://groups.google.com/group/sinatrarb/topics]
|
* [Mailing List](http://groups.google.com/group/sinatrarb/topics)
|
||||||
* {IRC: #sinatra}[irc://chat.freenode.net/#sinatra] on http://freenode.net
|
* [IRC: #sinatra](irc://chat.freenode.net/#sinatra) on http://freenode.net
|
||||||
* {Sinatra Book}[http://sinatra-book.gittr.com] Cookbook Tutorial
|
* [Sinatra Book](http://sinatra-book.gittr.com) Cookbook Tutorial
|
||||||
* {Sinatra Recipes}[http://recipes.sinatrarb.com/] Community
|
* [Sinatra Recipes](http://recipes.sinatrarb.com/) Community
|
||||||
contributed recipes
|
contributed recipes
|
||||||
* API documentation for the {latest release}[http://rubydoc.info/gems/sinatra]
|
* API documentation for the [latest release](http://rubydoc.info/gems/sinatra)
|
||||||
or the {current HEAD}[http://rubydoc.info/github/sinatra/sinatra] on
|
or the [current HEAD](http://rubydoc.info/github/sinatra/sinatra) on
|
||||||
http://rubydoc.info
|
http://rubydoc.info
|
||||||
* {CI server}[http://travis-ci.org/sinatra/sinatra]
|
* [CI server](http://travis-ci.org/sinatra/sinatra)
|
||||||
|
|
Loading…
Reference in New Issue