Questions tagged [padrino]

Padrino is a ruby framework built upon the excellent Sinatra Microframework. Sinatra is a DSL for quickly creating simple web applications in Ruby. Padrino was created to make it fun and easy to code more advanced web applications while still adhering to the spirit that makes Sinatra great!

Overview

Padrino is a Ruby framework built upon the excellent Sinatra microframework. This framework makes it as fun and easy as possible to code increasingly advanced web applications by expanding upon Sinatra while maintaining the spirit that made it great.

For more overview, please see the Wikipedia article.

Features

Here is a list of major functionality Padrino provides on top of Sinatra:

  • Agnostic: Full support for many popular testing, templating, mocking, and database libraries.
  • Generators: Create Padrino applications, models, controllers i.e: padrino g project.
  • Mountable: Unlike other ruby frameworks, principally designed for mounting multiple apps.
  • Routing: Full url named routes, named params, respond_to support, before/after filter support.
  • Tag Helpers: View helpers such as: tag, content_tag, input_tag.
  • Asset Helpers: View helpers such as: link_to, image_tag, javascript_include_tag.
  • Form Helpers: Builder support such as: form_tag, form_for, field_set_tag, text_field.
  • Text Helpers: Useful formatting like: relative_time_ago, js_escape_html, sanitize_html.
  • Mailer: Fast and simple delivery support for sending emails (akin to ActionMailer).
  • Admin: Builtin Admin interface (like Django).
  • Logging: Provide a unified logger that can interact with your ORM or any library.
  • Reloading: Automatically reloads server code during development.
  • Localization: Full support of I18n.

Note that as a user of Padrino, each of the major components can be pulled in separately to an existing Sinatra application or they can be used altogether for a comprehensive upgrade to Sinatra (a full-stack Padrino application).

To read more about registering certain Padrino functionality into your Sinatra application, check out the Standalone Usage in Sinatra guide.

378 questions
0
votes
1 answer

Configure Multiple App in Padrino with each having different Database and ORM Mapper

How to configure Multiple Applications in Padrino with each having different Database and ORM Mapper? I referred to this link have got the way to Maintain different Gemfilesfor each App with each having gems of Database they require. But how to do…
Jai Madhav
  • 603
  • 8
  • 17
0
votes
1 answer

Since adding observers to my Ruby module, my system locks up

It only happens on certain types of errors, for example if I make a call to a method that doesn't exist on one of my objects. But it's hard to get any information on what is causing this because I can't step through what is causing it, as my…
Jeremy Smith
  • 14,727
  • 19
  • 67
  • 114
0
votes
2 answers

Padrino with RSpec: "bundler: command not found: rspec"

With Padrino, I created a project with Shoulda as a testing framework. I then backpedaled and removed Shoulda and added RSpec. However, after adding spec/spec.rake and spec/spec_helper.rb, I'm having trouble running the tests. $ padrino rake spec =>…
Ethan Turkeltaub
  • 2,931
  • 8
  • 30
  • 45
0
votes
2 answers

Suddenly my admin pages won't load in Padrino (Template Engine not found)

I've never had an issues with the admin pages in my app before, but after a reboot of my machine I'm getting this error: RuntimeError at /admin/sessions/new Template engine not found: /sessions/new With this abbreviated…
Jeremy Smith
  • 14,727
  • 19
  • 67
  • 114
0
votes
1 answer

Rspecs for Sub APP and Main APP in Padrino

Is there any good way to test a controller and model of Sub APP in Padrino with rspec? I am a newbie experimenting with Padrino and Mongoid ORM. Can anyone provide me the link for examples showing rspecs for Sub APP and Main APP in Padrino.
Jai Madhav
  • 603
  • 8
  • 17
0
votes
3 answers

Non-expiring sessions in Padrino

I've made a Padrino app that has one single password for accessing the admin page. I'm using the following helpers for the authorization. # Check if the user is authenticated. def authenticated?(opts = {}) if session["cooly"] !=…
Ethan Turkeltaub
  • 2,931
  • 8
  • 30
  • 45
0
votes
1 answer

MongoMapper: undefined method `each' for "StandardFormBuilder":String

I'm using MongoMapper with Padrino, and I'm having trouble with executing any padrino tasks. I get this error for nearly every tasks. ethan@tardis:/var/www/sakura$ padrino rake -T => Executing Rake -T…
Ethan Turkeltaub
  • 2,931
  • 8
  • 30
  • 45
0
votes
1 answer

Added to existing EmbeddedDocuments in MongoMapper

Take the following MongoMapper documents. class Schedule include MongoMapper::Document key :name, String key :description, String key :active, Boolean many :periods timestamps! userstamps! end class Period include…
Ethan Turkeltaub
  • 2,931
  • 8
  • 30
  • 45
0
votes
2 answers

error installing padrino-cache gem on windows xp, ruby 1.9.2p180 and devkit

gem update padrino-cache Updating installed gems Updating padrino-cache ERROR: While executing gem ... (Errno::EINVAL) Invalid argument - C:/Ruby192/lib/ruby/gems/1.9.1/gems/padrino-cache-0.9.25/test/tmp/# ruby -v ruby…
aaandre
  • 2,502
  • 5
  • 33
  • 46
0
votes
0 answers

Passenger + Apache is not spawning padrino app

Problem: My application is not starting, I believe it is because Passenger spawn server is not working after apache2 has started. Following is the error after apache2 has started /etc/init.d/apache2 start tail -f /var/log/myapp/production.log […
Ashwin Yaprala
  • 2,737
  • 2
  • 24
  • 56
0
votes
1 answer

Padrino framework I18n routes translation

I have a question about localization, I am trying to do multilingual routes, using I18n. I am using translations in my project, but, I would like to do this get "/#{I18n.t('routes.kategorie')}" do ... but, loading crashes on ! Unable to load…
Mlok
  • 155
  • 9
0
votes
1 answer

Padrino route optional parameter

I am trying to do some tricks with routes. And I need to use optional route parameter in Padrino. I googled that solution for this are "()" parenthesis. I couldn't find in docs. But when I try to use get :sort, :with => [:order, :asc, '(:search)']…
Mlok
  • 155
  • 9
0
votes
1 answer

Sequel write multiple lines to associated tables

I am still new to Ruby. I have a model of database based on multilingual website. So, the schema of database is article: id article_lng: id lng article_data: title body ... Where the ID is in article, 2 or more records for one ID with…
Levi
  • 77
  • 7
0
votes
1 answer

How to set humanized name of padrino module?

How are you. I have just installed padrino framework admin panel. And it shows several tabs in admin module. I want to rename the labels. but how to do it? This is view side code <%= link_to project_module.human_name, url(project_module.path)…
Nomura Nori
  • 4,689
  • 8
  • 47
  • 85
0
votes
0 answers

padrino route with two names

I am thinking about 2 language concepts in my project. I have data separated in database. But I want to have 2 language routes and I don't want to write all routes duplicates. I have urls mydomain.com/kategorie mydomain.com/category Is it possible…
Mlok
  • 155
  • 9