Giter Club home page Giter Club logo

padrino-recipes's Introduction

Preface

Padrino is a Ruby framework built upon the excellent Sinatra Microframework. Sinatra is a DSL for creating simple web applications in Ruby with speed and minimal effort. This framework tries hard to make it as fun and easy as possible to code much more advanced web applications by building upon the Sinatra philosophies and foundation.

The recipes consists of two types: plugins and templates. A plugin adds additional functionality to an existing Padrino project. A template can be used as a template for a completely new Padrino application.

Plugins

To run a plugin:

$ cd <path-to-my-padrino-app>
$ padrino-gen plugin <name-of-the-plugin>

If you want to contribute with a plugin please follow the convention of having _plugin appended to the name (i.e. bootstrap_plugin.rb). Don't forget to put your plugin with a short explanation to the README here.

Templates

To run a template:

$ padrino-gen project my_project --template [template_path]

The templates folder contains full project generation templates. These files follow the convention of having _template appended to the name (i.e sampleblog_template.rb). Included template are:

  • angular: Template for an AngularJS app. It uses bower to manage your frontend resources.
  • lipsiasoft: template with haml/960/exception notifier and more used by LipsiaSOFT.
  • mongochist: templates that generate mongoid/mongomapper with machinist.
  • sampleblog: sample blog tutorial.
  • sampleblog_dm: sample blog tutorial with DataMapper instead of ActiveRecord.

Broken plugins

Contribute

Feel free to fork and add on to these recipes! Check out the Padrino Framework and its git repo.

padrino-recipes's People

Contributors

1gor avatar achiurizo avatar albertico avatar allegromanontroppo avatar bernerdschaefer avatar bolshakov avatar casi avatar daddye avatar felipecabargas avatar fnordfish avatar fredwu avatar jdewyea avatar leftathome avatar lusis avatar namusyaka avatar nesquena avatar ngiger avatar quintasan avatar renich avatar signum avatar skade avatar spllr avatar stevekinney avatar therabidbanana avatar tyabe avatar ujifgc avatar wakatara avatar waydotnet avatar wikimatze avatar wokibe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

padrino-recipes's Issues

will_paginate: overriding LinkRenderer

Hi,

Can somebody show me an example of overriding LinkRenderer class for padrino will_paginate plugin?

I've tried something like this:

module FriendlyPagination
  class LinkRenderer < WillPaginate::ViewHelpers::LinkRenderer
    #...
  end
end

And I get a NotImplementedError.
I'm using padrino 0.10.7 and will_paginate 3.0.4

Error in padrino-gen plugin better_error

   apply  https://github.com/padrino/padrino-recipes/raw/master/plugins/better_error_plugin.rb

/Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:346:in open_http': 406 Not Acceptable (OpenURI::HTTPError) from /Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:775:inbuffer_open'
from /Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:203:in block in open_loop' from /Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:201:incatch'
from /Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:201:in open_loop' from /Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:146:inopen_uri'
from /Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:677:in open' from /Users/piermariacosina/.rvm/rubies/ruby-1.9.3-p362/lib/ruby/1.9.1/open-uri.rb:33:inopen'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/actions.rb:216:in apply' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/runner.rb:135:inexecute_runner'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/plugin.rb:56:in setup_plugin' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/task.rb:27:inrun'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:120:in invoke_task' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:inblock in invoke_all'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:in each' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:inmap'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:in invoke_all' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/group.rb:238:indispatch'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/base.rb:425:in start' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:51:insetup'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/task.rb:27:in run' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:120:ininvoke_task'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:in block in invoke_all' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:ineach'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:in map' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/invocation.rb:126:ininvoke_all'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/group.rb:238:in dispatch' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/thor-0.15.4/lib/thor/base.rb:425:instart'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in <top (required)>' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/bin/padrino-gen:19:inload'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/bin/padrino-gen:19:in <main>' from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:ineval'
from /Users/piermariacosina/.rvm/gems/ruby-1.9.3-p362/bin/ruby_noexec_wrapper:14:in `

'

Redirection problem

Hi,

as GitHub is now using HTTPS as their default scheme, installing a plugin fails because of a redirecting issue.

 apply  http://github.com/padrino/padrino-recipes/raw/master/plugins/carrierwave_plugin.rb

/opt/local/lib/ruby/1.8/open-uri.rb:174:in `open_loop': redirection forbidden: http://github.com/padrino/padrino-recipes/raw/master/plugins/carrierwave_plugin.rb -> https://github.com/padrino/padrino-recipes/raw/master/plugins/carrierwave_plugin.rb (RuntimeError)

Maybe you have to change the URL from HTTP to HTTPS to make it work again.

Thanks and cheers,
Marc

blogsample doesn't install properly

Hey guys,

As the title states. My OS is: Fedora 18 x86_64
I removed all rubygems provided by fedora and reinstalled ruby. It still installs 3 or so rubygems. The purpose of this was to have a minimal ruby env.

check the output:

[renich@introlapg02org ~]$ gem install padrino
Fetching: tilt-1.3.4.gem (100%)
Fetching: rack-1.5.2.gem (100%)
Fetching: rack-protection-1.4.0.gem (100%)
Fetching: sinatra-1.3.5.gem (100%)
Fetching: url_mount-0.2.1.gem (100%)
Fetching: http_router-0.10.2.gem (100%)
Fetching: thor-0.15.4.gem (100%)
Fetching: i18n-0.6.4.gem (100%)
Fetching: multi_json-1.6.1.gem (100%)
Fetching: activesupport-3.2.12.gem (100%)
Fetching: padrino-core-0.10.7.gem (100%)
Fetching: padrino-helpers-0.10.7.gem (100%)
Fetching: mime-types-1.21.gem (100%)
Fetching: polyglot-0.3.3.gem (100%)
Fetching: treetop-1.4.12.gem (100%)
Fetching: mail-2.3.3.gem (100%)
Fetching: padrino-mailer-0.10.7.gem (100%)
Fetching: bundler-1.3.0.gem (100%)
Fetching: padrino-gen-0.10.7.gem (100%)
Fetching: padrino-cache-0.10.7.gem (100%)
Fetching: padrino-admin-0.10.7.gem (100%)
Fetching: padrino-0.10.7.gem (100%)
Successfully installed tilt-1.3.4
Successfully installed rack-1.5.2
Successfully installed rack-protection-1.4.0
Successfully installed sinatra-1.3.5
Successfully installed url_mount-0.2.1
Successfully installed http_router-0.10.2
Successfully installed thor-0.15.4
Successfully installed i18n-0.6.4
Successfully installed multi_json-1.6.1
Successfully installed activesupport-3.2.12
Successfully installed padrino-core-0.10.7
Successfully installed padrino-helpers-0.10.7
Successfully installed mime-types-1.21
Successfully installed polyglot-0.3.3
Successfully installed treetop-1.4.12
Successfully installed mail-2.3.3
Successfully installed padrino-mailer-0.10.7
Successfully installed bundler-1.3.0
Successfully installed padrino-gen-0.10.7
Successfully installed padrino-cache-0.10.7
Successfully installed padrino-admin-0.10.7
Successfully installed padrino-0.10.7
22 gems installed
Installing ri documentation for tilt-1.3.4...
Installing ri documentation for rack-1.5.2...
Installing ri documentation for rack-protection-1.4.0...
Installing ri documentation for sinatra-1.3.5...
Installing ri documentation for url_mount-0.2.1...
Installing ri documentation for http_router-0.10.2...
Installing ri documentation for thor-0.15.4...
Installing ri documentation for i18n-0.6.4...
Installing ri documentation for multi_json-1.6.1...
Installing ri documentation for activesupport-3.2.12...
Installing ri documentation for padrino-core-0.10.7...
Installing ri documentation for padrino-helpers-0.10.7...
Installing ri documentation for mime-types-1.21...
Installing ri documentation for polyglot-0.3.3...
Installing ri documentation for treetop-1.4.12...
Installing ri documentation for mail-2.3.3...
Installing ri documentation for padrino-mailer-0.10.7...
Installing ri documentation for bundler-1.3.0...
Installing ri documentation for padrino-gen-0.10.7...
Installing ri documentation for padrino-cache-0.10.7...
Installing ri documentation for padrino-admin-0.10.7...
Installing ri documentation for padrino-0.10.7...
Installing RDoc documentation for tilt-1.3.4...
Installing RDoc documentation for rack-1.5.2...
Installing RDoc documentation for rack-protection-1.4.0...
Installing RDoc documentation for sinatra-1.3.5...
Installing RDoc documentation for url_mount-0.2.1...
Installing RDoc documentation for http_router-0.10.2...
Installing RDoc documentation for thor-0.15.4...
Installing RDoc documentation for i18n-0.6.4...
Installing RDoc documentation for multi_json-1.6.1...
Installing RDoc documentation for activesupport-3.2.12...
Installing RDoc documentation for padrino-core-0.10.7...
Installing RDoc documentation for padrino-helpers-0.10.7...
Installing RDoc documentation for mime-types-1.21...
Installing RDoc documentation for polyglot-0.3.3...
Installing RDoc documentation for treetop-1.4.12...
Installing RDoc documentation for mail-2.3.3...
Installing RDoc documentation for padrino-mailer-0.10.7...
Installing RDoc documentation for bundler-1.3.0...
Installing RDoc documentation for padrino-gen-0.10.7...
Installing RDoc documentation for padrino-cache-0.10.7...
Installing RDoc documentation for padrino-admin-0.10.7...
Installing RDoc documentation for padrino-0.10.7...
[renich@introlapg02org ~]$ cd Projects/ruby/padrino/
[renich@introlapg02org padrino]$ padrino g project sample_blog --template sampleblog
       apply  https://github.com/padrino/padrino-recipes/raw/master/templates/sampleblog_template.rb
  => Executing: padrino-gen project sample_blog --bundle=true --orm=activerecord --renderer=haml --script=jquery --stylesheet=sass --test=shoulda -r=/home/renich/Projects/ruby/padrino
      create  
      create  .gitignore
      create  config.ru
      create  config/apps.rb
      create  config/boot.rb
      create  public/favicon.ico
      create  public/images
      create  public/javascripts
      create  public/stylesheets
      create  tmp
      create  .components
      create  app
      create  app/app.rb
      create  app/controllers
      create  app/helpers
      create  app/views
      create  app/views/layouts
      create  Gemfile
    applying  activerecord (orm)...
       apply  orms/activerecord
      insert  Gemfile
      insert  Gemfile
      insert  app/app.rb
      create  config/database.rb
    applying  shoulda (test)...
       apply  tests/shoulda
      insert  Gemfile
      insert  Gemfile
      create  test/test_config.rb
      insert  test/test_config.rb
      create  test/test.rake
    skipping  mock component...
    applying  jquery (script)...
       apply  scripts/jquery
      create  public/javascripts/jquery.js
      create  public/javascripts/jquery-ujs.js
      create  public/javascripts/application.js
    applying  haml (renderer)...
       apply  renderers/haml
      insert  Gemfile
    applying  sass (stylesheet)...
       apply  stylesheets/sass
      insert  Gemfile
      insert  app/app.rb
      create  lib/sass_init.rb
      create  app/stylesheets
   identical  .components
Bundling application dependencies using bundler...
     run  bundle install from "."
The source :rubygems is deprecated because HTTP requests are insecure.
Please change your source to 'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Fetching gem metadata from http://rubygems.org/...........
Fetching gem metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake (10.0.3) 
Using i18n (0.6.4) 
Using multi_json (1.6.1) 
Using activesupport (3.2.12) 
Installing builder (3.0.4) 
Installing activemodel (3.2.12) 
Installing arel (3.0.2) 
Installing tzinfo (0.3.35) 
Installing activerecord (3.2.12) 
Installing metaclass (0.0.1) 
Installing mocha (0.10.5) 
Installing bourne (1.1.2) 
Using bundler (1.3.0) 
Using tilt (1.3.4) 
Installing haml (4.0.0) 
Using rack (1.5.2) 
Using url_mount (0.2.1) 
Using http_router (0.10.2) 
Using mime-types (1.21) 
Using polyglot (0.3.3) 
Using treetop (1.4.12) 
Using mail (2.3.3) 
Using rack-protection (1.4.0) 
Using sinatra (1.3.5) 
Using thor (0.15.4) 
Using padrino-core (0.10.7) 
Using padrino-helpers (0.10.7) 
Using padrino-admin (0.10.7) 
Using padrino-cache (0.10.7) 
Using padrino-gen (0.10.7) 
Using padrino-mailer (0.10.7) 
Using padrino (0.10.7) 
Installing rack-test (0.6.2) 
Installing sass (3.2.6) 
Installing shoulda-context (1.0.2) 
Installing shoulda-matchers (1.4.2) 
Installing shoulda (3.3.2) 
Installing sinatra-flash (0.3.0) 
Installing sqlite3 (1.3.7) 

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb 
mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h


Gem files will remain installed in /home/renich/.gem/ruby/1.9.1/gems/sqlite3-1.3.7 for inspection.
Results logged to /home/renich/.gem/ruby/1.9.1/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out

An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that `gem install sqlite3 -v '1.3.7'` succeeds before bundling.

=================================================================
sample_blog is ready for development!
=================================================================
$ cd /home/renich/Projects/ruby/padrino/sample_blog
=================================================================

      insert    app/app.rb
  => Executing: padrino-gen admin -r=/home/renich/Projects/ruby/padrino/sample_blog
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
=> Executing Rake ar:create ar:migrate seed ...
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
  => Executing: padrino-gen model post title:string body:text -r=/home/renich/Projects/ruby/padrino/sample_blog
Could not find gem 'sqlite3 (>= 0) ruby' in the gems available on this machine.
Run `bundle install` to install missing gems.
      insert    db/migrate/002_create_posts.rb
/home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/actions/inject_into_file.rb:99:in `binread': No such file or directory - /home/renich/Projects/ruby/padrino/sample_blog/db/migrate/002_create_posts.rb (Errno::ENOENT)
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/actions/inject_into_file.rb:99:in `replace!'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/actions/inject_into_file.rb:60:in `invoke!'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/actions.rb:95:in `action'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/actions/inject_into_file.rb:31:in `insert_into_file'
    from https://github.com/padrino/padrino-recipes/raw/master/templates/sampleblog_template.rb:22:in `apply'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/actions.rb:221:in `instance_eval'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/actions.rb:221:in `apply'
    from /home/renich/.gem/ruby/1.9.1/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/runner.rb:135:in `execute_runner'
    from /home/renich/.gem/ruby/1.9.1/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/project.rb:56:in `setup_project'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
    from /home/renich/.gem/ruby/1.9.1/gems/padrino-gen-0.10.7/lib/padrino-gen/generators/cli.rb:51:in `setup'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/task.rb:27:in `run'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:120:in `invoke_task'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `block in invoke_all'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `each'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `map'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/invocation.rb:126:in `invoke_all'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/group.rb:238:in `dispatch'
    from /home/renich/.gem/ruby/1.9.1/gems/thor-0.15.4/lib/thor/base.rb:425:in `start'
    from /home/renich/.gem/ruby/1.9.1/gems/padrino-gen-0.10.7/bin/padrino-gen:16:in `<main>'

960 plugin

howdie,

I get following RuntimeError whe trying to install the 960plugin into my padrino-app:

/usr/local/rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/open-uri.rb:216:in open_loop': redirection forbidden: http://github.com/nathansmith/960-Grid-System/raw/master/code/css/rese t.css -> https://github.com/nathansmith/960-Grid-System/raw/master/code/css/reset.css (RuntimeError) from /usr/local/rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/open-uri.rb:146:inopen_uri'
from /usr/local/rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/open-uri.rb:671:in open' from /usr/local/rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/open-uri.rb:33:inopen'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:77:in get' from /root/padrino_projects/wickedpress/recipes/plugins/960_plugin.rb:2:inblock in apply'
from /root/padrino_projects/wickedpress/recipes/plugins/960_plugin.rb:1:in each' from /root/padrino_projects/wickedpress/recipes/plugins/960_plugin.rb:1:inapply'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/actions.rb:217:in instance_eval' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/actions.rb:217:inapply'
from /src/padrino-framework/padrino-gen/lib/padrino-gen/generators/runner.rb:86:in execute_runner' from /src/padrino-framework/padrino-gen/lib/padrino-gen/generators/plugin.rb:49:insetup_plugin'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/task.rb:22:in run' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:ininvoke_task'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in block in invoke_all' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:ineach'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in map' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:ininvoke_all'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/group.rb:226:in dispatch' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/base.rb:389:instart'
from /src/padrino-framework/padrino-gen/lib/padrino-gen/generators/cli.rb:43:in setup' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/task.rb:22:inrun'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:inblock in invoke_all'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in each' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:inmap'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/invocation.rb:124:in invoke_all' from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/group.rb:226:indispatch'
from /usr/local/rvm/gems/ruby-1.9.2-p0/gems/thor-0.14.6/lib/thor/base.rb:389:in start' from /src/padrino-framework/padrino-gen/bin/padrino-gen:15:in

'

I tried it so:
[@]# padrino-dev g plugin 960

and so:
[@]# padrino g plugin 960

and also downloaded the file to my machine an tried this way:
[@]# padrino-dev g plugin recipes/plugins/960_plugin.rb

and this way:
[@]# padrino g plugin recipes/plugins/960_plugin.rb

I also reinstalled all gems havin openuri or open or uri in em. Still same RuntimeError.

Thanks for your help.

Lipsiasoft template

Just from reading the code:
In line 18 shouldn't it be set :exceptions_subject, "#{exception_subject}"
since in line 13 this value has been asked for?

raphaeljs is broken

       apply  https://raw.github.com/padrino/padrino-recipes/master/plugins/raphaeljs_plugin.rb
  The template at https://raw.github.com/padrino/padrino-recipes/master/plugins/raphaeljs_plugin.rb could not be found!

blueprint is broken

For a fresh app (it takes erb as the default renderer) I get:

padrino-gen plugin blueprint
WARN: Unresolved specs during Gem::Specification.reset:
      activesupport (>= 3.1)
      tilt (< 3, >= 1.3)
      mustermann19 (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
       apply  https://raw.github.com/padrino/padrino-recipes/master/plugins/blueprint_plugin.rb
      create    app/views/shared/_blueprint.none
  The template at https://raw.github.com/padrino/padrino-recipes/master/plugins/blueprint_plugin.rb could not be found!

Since blueprint is not maintained anymore (last change from 2011) I think we should drop this plugin.

again will_paginate corrections

Sometimes I run into the situation, that my corrections for issue #33 generate at padrino start the error: "uninitialized constant WillPaginate::Sinatra".

I could not pin down the cause for this behavior, but some experiments (with the help of an old will_paginate issue mislav/will_paginate#149) delivered a solution:

I had to move the three will_paginate requires in boot.rb into the Padrion.before_load block.

I will submit an pull request with this change, plus the missing addition to the Gemfile:
inject_into_file destination_root('Gemfile'),
"gem 'will_paginate', '~>3.0'\n",
:after => "Component requirements\n"

best regards
Wolfkibe

barista recipy

padrino-gen plugin barista
isnt add in Gemfile line -
gem "barista"

Is Rack::Protection still necessary?

While reading the Sinatra intro, I stumbled upon the following part:

http://www.sinatrarb.com/intro.html#Configuring%20attack%20protection

From what I understand, Rack::Protection is enabled by default in Sinatra. Having already installed it from the padrino-recipes in my app, I was wondering if it was superfluous to have a recipe for it.

Is there something I am missing?

carrierwave is broken

I've encountered this error with ruby-2.2.1 and padrino 0.13.1

$ padrino-gen plugin carrierwave
No local changes to save
WARN: Unresolved specs during Gem::Specification.reset:
      activesupport (>= 3.1)
      tilt (< 3, >= 1.3)
      mustermann19 (>= 0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
       apply  https://raw.github.com/padrino/padrino-recipes/master/plugins/carrierwave_plugin.rb
      create    lib/uploader.rb
  => Executing: padrino-gen model upload file:text created_at:datetime -r=/tmp/sample_blog_updated
=> Problem loading /tmp/sample_blog_updated/config/boot.rb
=> uninitialized constant CarrierWave
  /tmp/sample_blog_updated/lib/uploader.rb:1:in `<top (required)>'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-core-0.13.1/lib/padrino-core/reloader.rb:95:in `block in safe_load'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-core-0.13.1/lib/padrino-core/reloader.rb:308:in `with_silence'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-core-0.13.1/lib/padrino-core/reloader.rb:95:in `safe_load'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-core-0.13.1/lib/padrino-core/loader.rb:154:in `block in require_dependencies'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-core-0.13.1/lib/padrino-core/loader.rb:152:in `each'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-core-0.13.1/lib/padrino-core/loader.rb:152:in `require_dependencies'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-core-0.13.1/lib/padrino-core/loader.rb:58:in `load!'
  /tmp/sample_blog_updated/config/boot.rb:50:in `<top (required)>'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-gen-0.13.1/lib/padrino-gen/generators/cli.rb:26:in `require'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-gen-0.13.1/lib/padrino-gen/generators/cli.rb:26:in `load_boot'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
  /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-gen-0.13.1/bin/padrino-gen:16:in `<main>'
       apply  orms/activerecord
       apply  tests/rspec
      create  models/upload.rb
      create  spec/models/upload_spec.rb
      create  db/migrate/004_create_uploads.rb
     prepend    models/upload.rb
      insert    Gemfile
      insert    models/upload.rb

ar_textile seems broken

I've encountered this error with ruby-2.2.1 and padrino 0.13.1

$padrino-gen plugin ar_textile
       apply  https://raw.github.com/padrino/padrino-recipes/master/plugins/ar_textile_plugin.rb
      insert    Gemfile
      insert    config/boot.rb
/home/wm/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:457:in `load': No such file to load -- RedCloth (LoadError)
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:457:in `block in load_file'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:647:in `new_constants_in'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:456:in `load_file'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:354:in `require_or_load'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:317:in `depend_on'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.6/lib/active_support/dependencies.rb:233:in `require_dependency'
        from https://raw.github.com/padrino/padrino-recipes/master/plugins/ar_textile_plugin.rb:18:in `apply'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/actions.rb:223:in `instance_eval'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/actions.rb:223:in `apply'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-gen-0.13.1/lib/padrino-gen/generators/runner.rb:135:in `execute_runner'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-gen-0.13.1/lib/padrino-gen/generators/plugin.rb:42:in `setup_plugin'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-gen-0.13.1/lib/padrino-gen/generators/cli.rb:50:in `setup'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `block in invoke_all'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `each'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `map'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:133:in `invoke_all'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/group.rb:232:in `dispatch'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
        from /home/wm/.rvm/gems/ruby-2.2.1/gems/padrino-gen-0.13.1/bin/padrino-gen:16:in `<top (required)>'
        from /home/wm/.rvm/gems/ruby-2.2.1/bin/padrino-gen:23:in `load'
        from /home/wm/.rvm/gems/ruby-2.2.1/bin/padrino-gen:23:in `<main>'

better_errors gets blocked by Rack::Protection::AuthenticityToken in 0.12.4

I have determined that better_errors plugin gets blocked by Rack::Protection::AuthenticityToken in 0.12.4. This is because :protect_from_csrf in config/apps.rb is overidden later on

config/apps.rb after creating a new project with better_errors plugin

Padrino.configure_apps do                                                                 
  # Use better_errors
  set :protect_from_csrf, except: %r{/__better_errors/\w+/\w+\z} if Padrino.env == :development
  # enable :sessions
  set :session_secret, '7915b711b8d403972f29673d8d9f126a91da4fa88bc5b22c8b36a21674c2fc00'
  set :protection, :except => :path_traversal
  set :protect_from_csrf, true
end

Unable to install bootsrap gem

I'm getting the following error while trying to install the bootstrap gem with padrino-gen plugin bootstrap command.

 apply  https://raw.github.com/padrino/padrino-recipes/master/plugins/bootstrap_plugin.rb
  The template at https://raw.github.com/padrino/padrino-recipes/master/plugins/bootstrap_plugin.rb could not be found!

Please help.

Warning with Ruby 2

/Library/Ruby/Gems/2.0.0/gems/watchr-0.7/lib/watchr.rb:111:in `handler': Use RbConfig instead of obsolete and deprecated Config.

sprockets2 recipe

It's still early, but I'm going to explore integrating sprockets2 into Padrino and provide a recipe
https://github.com/sstephenson/sprockets

It's rack based and supports sass & coffeescript (even on heroku). Seems to be working already in Rails 3.1 in src.

Seems a lot slicker than jammit since there's no compile step. It just serves everything directly from the web, and depends on HTTP headers & varnish to handle the caching.

Installing plugin doesn't work

Hi guys, I'm trying to install maintenance plugin but it doesn't find the plugin source code... it seems that the url generator is asking for redirects to another 3level github FQDN but the script can't follow it.

$ padrino-gen plugin maintenance
WARNING: Nokogiri was built against LibXML version 2.9.1, but has dynamically loaded 2.7.3
DEPRECATION WARNING: ActiveSupport::Memoizable is deprecated and will be removed in future releases,simply use Ruby memoization pattern instead. (called from require at /Users/thesp0nge/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/runtime.rb:81)
       apply  https://github.com/padrino/padrino-recipes/raw/master/plugins/maintenance_plugin.rb
  The template at https://github.com/padrino/padrino-recipes/raw/master/plugins/maintenance_plugin.rb could not be found!

** UPDATE
I tried also with other plugins and it seems the problem is widespread

Heroku plugin to handle compass/sass

The heroku plugin makes deploying to heroku so much easier, yet 2 problems will stop a newbie in his tracks.

  1. If compass is used in the project, heroku will bomb out. Perhaps the plugin could add in the compass_plugin.rb:
    if Padrino.env == :production
        Sass::Plugin.options[:never_update] = true
    end 

Before:
Compass.configure_sass_plugin!
Compass.handle_configuration_change!

  1. If you missed the part in the blog tutorial about bundle install without-production, you'll get a "pg not install" error after everything you do. Perhaps the plugin could warn the user.

better_errors triggers CSRF protection

(My background: experienced web developer - basic Rails experience - been using Padrino for just 2 days)

I just found these recipes today (which I believe need better marketing because they are really cool) and wanted to get better_errors for my Padrino web application. So I ran

padrino g plugin better_errors

And started the built-in web server

padrino s

When I triggered a problem from my controller (e.g. foo=42/0) I just saw the left column of the better_errors panel. My console log shows:

DEBUG - GET (0.0142s) / - 500 Internal Server Error
WARN - attack prevented by Rack::Protection::AuthenticityToken
DEBUG - POST (0.0010s) /__better_errors/23645200/variables - 403 Forbidden

It looks like the CSRF protection was triggered. I could fix it (for the worse) by editing config/apps.rb and setting:

#set :protect_from_csrf, true

Obviously that does not leave me with a good feeling. Is there a way to use better_errors properly without sacrificing security?

(Thanks for a great framework! It's been a long time I've had that much fun coding web applications.)

coderay is broken

       apply  https://raw.github.com/padrino/padrino-recipes/master/plugins/coderay_plugin.rb
      insert    Gemfile
      insert    Gemfile
      insert    app/app.rb
      create    lib/coderay_initializer.rb

  The template at https://raw.github.com/padrino/padrino-recipes/master/plugins/coderay_plugin.rb could not be found!

The CSS file is not available under the location and gitrepo has changed.

`open_http': 406 Not Acceptable (OpenURI::HTTPError)

When trying to install a plugin from the official recipes repo I get the following:

$ padrino g plugin carrierwave_plugin apply https://github.com/padrino/padrino-recipes/raw/master/plugins/carrierwave_plugin_plugin.rb
/Users/xavierriley/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/open-uri.rb:346:in open_http': 406 Not Acceptable (OpenURI::HTTPError) from /Users/xavierriley/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/open-uri.rb:769:inbuffer_open'
from /Users/xavierriley/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/open-uri.rb:203:in block in open_loop' from /Users/xavierriley/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/open-uri.rb:201:incatch'
(etc.....)

I've tracked it down to an issue with Thor's apply method (docs here -- http://rdoc.info/github/wycats/thor/master/Thor/Actions#apply-instance_method)
It wants to see a header of "Accept" => "application/x-thor-template" but github doesn't seem to apply this.

Any ideas for how to get around this? (admin - Should this issue go in the main Padrino repo instead?)

Thanks,

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.