imazen / reunion-sample

Starter sample for working with reunion
MIT License
4 stars 0 forks source link

Missing attr_writer for App #1

Open copiousfreetime opened 10 years ago

copiousfreetime commented 10 years ago

Not sure where to put the org...

bundle exec puma config.ru
Puma starting in single mode...
* Version 2.8.2 (ruby 2.1.2-p95), codename: Sir Edmund Percival Hillary
* Min threads: 0, max threads: 16
* Environment: development
App reloaded
! Unable to load application
config.ru:5:in `block (2 levels) in <main>': undefined method `org=' for #<Reunion::Web::App:0x007fd259d2b788> (NoMethodError)
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/sinatra-1.4.4/lib/sinatra/base.rb:872:in `initialize'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/sinatra-1.4.4/lib/sinatra/base.rb:1454:in `new'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/sinatra-1.4.4/lib/sinatra/base.rb:1454:in `new'
    from config.ru:5:in `block in <main>'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
    from config.ru:in `new'
    from config.ru:in `<main>'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/rack-1.5.2/lib/rack/builder.rb:49:in `eval'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/rack-1.5.2/lib/rack/builder.rb:49:in `new_from_string'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/rack-1.5.2/lib/rack/builder.rb:40:in `parse_file'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/puma-2.8.2/lib/puma/configuration.rb:96:in `app'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/puma-2.8.2/lib/puma/runner.rb:113:in `load_and_bind'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/puma-2.8.2/lib/puma/single.rb:73:in `run'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/puma-2.8.2/lib/puma/cli.rb:499:in `run'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/gems/puma-2.8.2/bin/puma:10:in `<top (required)>'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/bin/puma:23:in `load'
    from /Users/jeremy/.gem/repos/ruby-2.1.2/reunion/bin/puma:23:in `<main>'
lilith commented 10 years ago

Ah, yeah, let me update the sample app... I'll ping you when it's ready.

copiousfreetime commented 10 years ago

Sounds good.

lilith commented 10 years ago

I pushed an update that should at least run the app correctly.

lilith commented 10 years ago

There's a bit of ugly around how an organization gets associated with a webapp (which was introduced when I added a caching layer). I remember Sinatra getting in the way, but I'm not sure about the details.

The sample project now has /web/app.rb so you can add new views and pages to your app as needed. I also updated the rules.rb to basically be a real-world scenario.

There's certainly room for improvement, but my investment in the project has been minimal since tax season. I'm sure I'll be doing more work on it in Q3.