sinatra / sinatra-book Goto Github PK
View Code? Open in Web Editor NEWThis project forked from cschneid/sinatra-book
Tutorial + Cookbook
Home Page: http://sinatra-org-book.herokuapp.com/
This project forked from cschneid/sinatra-book
Tutorial + Cookbook
Home Page: http://sinatra-org-book.herokuapp.com/
How do encoded URLs get handled?
Open up Models chapter with an intro
I think some documentation regarding Konstantin's sinatra-namespace extension would be a welcome addition!
Thoughts?
development techniques chapter intro
handle caching various parts of application, including sessions, using some of rack-cache store options. Such as dalli.
I am getting
invalid byte sequence in US-ASCII
when I run
bundle exec rake book:build
I'm using Ruby 2.1.2
You can use regexes in Sinatra routes. Describe how that works.
I would suggest against using symlinks as they can cause headaches later on, and are error prone on windows machines.
Please see my commit here for patch: http://github.com/zacharyscott/sinatra-book/commit/7cf82764aeed0b984b36066f3a20f773e6ee9648
Any other thoughts on this are appreciated
I use OS X version 10.9 and ruby 2.0.0p247
Error after trying bundle
NoMethodError: undefined method `size' for nil:NilClass
An error occurred while installing wkhtmltopdf-binary (0.9.9.1), and Bundler cannot continue.
Make sure that `gem install wkhtmltopdf-binary -v '0.9.9.1'` succeeds before bundling.
This is a very small issue, so I didn't want to fork this repo and submit a pull. The tutorial at http://sinatra-book.gittr.com/ says "Finally, the view at ./view/index.html:" in the "models" section. I believe the view subsequently shown should be stored at ./view/index.erb instead.
i'm on Ubuntu 12.04
and ruby 2.1.0
I'm trying to build the sinatra book. I'am already following step on README.md. but, its show me error about QSsslSocket
.
this is my error-trace:
2.1.0 in sinatra-book.gittr.com/ on master
› bundle install
Using rake (0.9.2.2)
Using pdfkit (0.5.2)
Using rack (1.4.1)
Using rack-protection (1.2.0)
Using redcarpet (2.1.1)
Using tilt (1.3.3)
Using sinatra (1.3.3)
Using wkhtmltopdf-binary (0.9.9.1)
Using bundler (1.5.0)
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.
2.1.0 in sinatra-book.gittr.com/ on master
› bundle exec rake book:build
QSslSocket: cannot resolve SSLv2_client_method
QSslSocket: cannot resolve SSLv2_server_method
QSslSocket: cannot resolve SSLv2_client_method
QSslSocket: cannot resolve SSLv2_server_method
thankyou 👍
update:
i tried on Ruby 1.9.4-p448
too. raise the same QSslSocket
error.
Here is the discussion: http://groups.google.com/group/sinatrarb/browse_thread/thread/a1f4d4a4e273bd4f
?? Maybe just a pointer to more docs?
A fellow came into #sinatra today and also posted their question on the mailinglist
He managed to solve the problem by modifying ENV and using Sinatra 1.0, I guess because tilt 1.1 is not working so well with dreamhost.
I hope to use their example to update the dreamhost documentation of the book so that others with the same problem can follow suit.
The '#' symbol gets unescaped in the produced .tex file thus causing an error: 'You can't use `macro parameter character #' in horizontal mode.'
Just got bit by sinatra/sinatra#489 myself recently. The FAQ should be updated to reflect the current recommendation.
Pull in #37 and add some doc examples for Slim
The link to the rendered book doesn't have a DNS entry. I get:
The server at sinatra-book.gittr.com can't be found, because the DNS lookup failed. DNS is
the network service that translates a website's name to its Internet address. This error is
most often caused by having no connection to the Internet or a misconfigured network. It can
also be caused by an unresponsive DNS server or a firewall preventing Google Chrome
from accessing the network.
Error code: ERR_NAME_NOT_RESOLVED
special icon showing that we're talking about deep-down voodoo.
intro for deployment chapter
Use selenium / capybara to run real browser tests
Would like to expand on the models chapter to cover the following subjects:
Any other suggestions / help here is, as always, much appreciated!
One of the questions that come up most on IRC is how to do user authentication. I think this should be covered (at least partially).
This will be a new chapter covering some extensions and common conventions for organizing a sinatra application. Included is Issue #28.
I get this error when I try building the book in any format
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
Do we really need this .bundle/config in repo? Because bundle install
on OS X tries to install all required gems to /usr/local/ruby (which is not available on OS X by default) instead of /Library/Ruby/Gems/*?
cd .bundle/
mv config config.weird
fixes the issue
Full report below:
What did you do?
I ran the command /usr/local/bin/bundle install
What did you expect to happen?
I expected Bundler to output following:
Using rake 0.9.2.2
Using pdfkit 0.5.2
Using rack 1.4.1
Using rack-protection 1.2.0
Using redcarpet 2.1.1
Using tilt 1.3.3
Using sinatra 1.3.3
Using wkhtmltopdf-binary 0.9.9.1
Using bundler 1.10.6
Bundle complete! 5 Gemfile dependencies, 9 gems now installed.
Use bundle show [gemname]
to see where a bundled gem is installed.
What happened instead?
Instead, what actually happened was...
Error details
Errno::EACCES: Permission denied - /usr/local/ruby
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:245:in `fu_mkdir'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:219:in `block (2 levels) in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `reverse_each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:217:in `block in mkdir_p'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `each'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/fileutils.rb:203:in `mkdir_p'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler.rb:308:in `mkdir_p'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/installer.rb:278:in `create_bundle_path'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/installer.rb:54:in `run'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/installer.rb:18:in `install'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/cli/install.rb:107:in `run'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/cli.rb:162:in `install'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/cli.rb:10:in `start'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/bin/bundle:20:in `block in <top (required)>'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
/Library/Ruby/Gems/2.0.0/gems/bundler-1.10.6/bin/bundle:18:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Environment
Bundler 1.10.6
Rubygems 2.4.8
Ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
GEM_HOME /usr/local/ruby/2.0.0
GEM_PATH
Git 2.3.8 (Apple Git-58)
Bundler settings
gem.coc
Set for the current user (/Users/niemda/.bundle/config): "true"
gem.mit
Set for the current user (/Users/niemda/.bundle/config): "false"
path
Set for your local app (/Users/niemda/git/sinatra-book/.bundle/config): "/usr/local"
disable_shared_gems
Set for your local app (/Users/niemda/git/sinatra-book/.bundle/config): "1"
--- TEMPLATE END ----------------------------------------------------------------
Unfortunately, an unexpected error occurred, and Bundler cannot continue.
A section on Hudson would be great, though not sure if it should go in the "Development Techniques" chapter or "Deployment" chapter.
A section on autotest would be a good addition to the "Development Techniques" chapter
Now that we have sinatra 1.1 and more people get aware of sinatra I can see a lot of redundancy between the sinatra readme and the sinatra book. Why not merge the two and keep the readme at a bare minimum?
I'm unable to get the book to build on Linux (Chakra) or OSX (Mountain Lion). Here's the error on OSX (same on Linux, actually):
hinmn-air:sinatra-book hinmn$ bundle exec rake book:build
sh: /Users/hinmn/Development/BooksCode/SinatraBook/sinatra-book/vendor/wkhtmltopdf: cannot execute binary file
rake aborted!
command failed: "/Users/hinmn/Development/BooksCode/SinatraBook/sinatra-book/vendor/wkhtmltopdf" "--page-size" "Letter" "--margin-top" "0.75in" "--margin-right" "0.75in" "--margin-bottom" "0.75in" "--margin-left" "0.75in" "--encoding" "UTF-8" "--quiet" "-" "-"
Tasks: TOP => book:build
(See full trace by running task with --trace)
I looked through the previous issues but the other failed book builds seemed to be solved. Here's the command with --trace:
https://gist.github.com/c07cb6287f5e54c477a8
The book recommends gem 'rack-flash' for session-based notifications, but rack-flash doesn't work with up-do-date versions of rack. The sinatra-authentication gem also requires rack-flash.
There's a note in the Filters chapter on line 75 that should be removed once 1.1 is released.
There has been some interesting discussion of jruby + sinatra on the mailinglist. Some coverage of that topic in the book would be great!
quick introductory chapter for the basics of sinatra and links to the readme for more information where relevant.
I have a patch together for bundling edge sinatra and it's dependencies.
Before I finish it up and create a pull request I'd like to know what other Sinatra dependencies there will be come 1.1 and beyond; that we can anticipate.
So far I just have rack, but what about tilt? Will that be a dependency once it's unbundled from base? Are there any other dependencies I'm forgetting?
As discussed in #15 there should be some information regarding contributing to the book.
Also need to update the core sinatra contirubtion guide:
This should round out the contributing guide.
It's been several months or nearly a year since PATCH
support was added.
I have been preferring PATCH
over PUT
since then.
We need to update the guide and examples.
Email email email.
Sending:
Receiving:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.