GithubHelp home page GithubHelp logo

scanty's Issues

Parse error

I just tried the following blog content (from markdown tutorial):

> ## This is a header.
> 
> 1.   This is the first list item.
> 2.   This is the second list item.
> 
> Here's some example code:
> 
>     return shell_exec("echo $input | $markdown_script");

and received this error:

REXML::ParseException at /past/2011/6/6/test/
#<REXML::ParseException: Malformed comment Line: 116 Position: 5938 Last 80 unconsumed characters: > /Users/zepplock/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rexml/parsers/baseparser.rb:352:in `pull' /Users/zepplock/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rexml/parsers/treeparser.rb:22:in `parse' /Users/zepplock/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rexml/document.rb:230:in `build' /Users/zepplock/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/rexml/document.rb:43:in `initialize' /Users/zepplock/code/scanty/vendor/maruku/maruku/output/to_latex_entities.rb:72:in 

update config.ru to match new demands

Hi,

In order to get this warnings away when starting scanty via "thin -R config.ru start":
[...]
config.ru:4: warning: Sinatra::Application.default_options is deprecated; use 'set' instead.
config.ru:4: warning: The :env option is deprecated; use :environment instead.
config.ru:11: warning: Sinatra.application is deprecated; use Sinatra::Application instead.
[...]

New config.ru:

require 'rubygems'
require 'sinatra'

Sinatra::Default.set(
:views => File.join(File.dirname(FILE), 'views'),
:run => false,
:environment => ENV['RACK_ENV']
)

require 'main'
run Sinatra::Application

Thanks in advance,
Francisco Cabrita

Can't login

When I try to login, before doing anything else (except changing the config variables), I get this error:

NoMethodError at /auth
undefined method `set_cookie' for #Sinatra::Application:0x00000103050a30
On line 92 of main.rb

  91. post '/auth' do
      92. set_cookie(Blog.admin_cookie_key, Blog.admin_cookie_value) if params[:password] == Blog.admin_password
      93. redirect '/'
  94. end 

I am using Sinatra 1.0 on Ruby 1.9

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.