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
1
vote
2 answers

padrino g: cannot load such file -- sequel/plugins/schema

new to Ruby, decided to start with Padrino framework was following http://padrinorb.com/guides/getting-started/blog-tutorial/ I created my project using padrino g project blog-tutorial -e erb -c scss -s jquery -d sequel -a mysql2 -b, then I tried to…
user846437
1
vote
1 answer

ActiveRecord partial updates in Padrino

How do I configure ActiveRecord to use partial_updates in a Padrino application? Customer < ActiveRecord::Base after_update :check_name_change private def check_name_change if name_changed? # send mail notification for change of…
Vignesh
  • 558
  • 5
  • 15
1
vote
2 answers

DataMapper Association Migrations

I'm using Padrino with DataMapper, and I'm trying to make a migration for adding an association to a model. For example, I begin with this: class User include DataMapper::Resource property :id, Serial property :name, String end class Post …
Ethan Turkeltaub
  • 2,931
  • 8
  • 30
  • 45
1
vote
0 answers

Deploying Padrino via Capistrano with Sequel migrations

I'm looking for the basic recipe to get my Sequel migrations running in production. The local rake tasks are very nice (sq:migrate) but I haven't come across anything to get the migrations running on the production server. Best to just roll my own…
Larsenal
  • 49,878
  • 43
  • 152
  • 220
1
vote
1 answer

render different files for mobile vs desktop

I'm coding on a little web app using http://padrinorb.org (haml+lesscss) for both mobile (android/iPhone/iPad) and desktop users, and as such, I wish to display slightly different html/css for the different devices. To determine the various clients…
qzio
  • 12,533
  • 1
  • 15
  • 8
1
vote
2 answers

Type Casting a Column to bigint in Padrino Active Record

I have upgraded to the latest Ruby on a Padrino application and I am having errors with active record when creating a new object. It's validating a number (an ISBN) as 4 bytes. The error is: 9781407005416 is out of range for…
Conor
  • 1,781
  • 17
  • 27
1
vote
2 answers

How connect logstash to padrino framework

I need to make logging with logstash in Padrino project. I setup logstash on remote server and tried to integrate it with Padrino project, I found only one solution logger = LogStashLogger.new(type: :udp, host: host, port: 5044) if RACK_ENV =…
Sergii Naumenko
  • 95
  • 1
  • 10
1
vote
0 answers

Generating binary files with Sitespec fails when a Padrino Rack app

I am working on a project with Sitespec, which is a static site generator using RSpec and uses any Rack app. I chose Padrino as a Rack app for Sitespec. Then, I get the following errors when I do rspec at some URLs of Content-type: image/png…
Nyoho
  • 467
  • 1
  • 4
  • 8
1
vote
0 answers

Using Sidekiq with Padrino - Sidekiq does not inherit the environment

I am using Padrino (0.13.2) with Sidekiq (4.2.7) and I have some Mailers set up in Padrino to fire off when things occur in my app. Here's the set up info (from here, mostly) At first, when running sidekiq with bundle exec sidekiq -r…
Oranges13
  • 1,084
  • 1
  • 10
  • 33
1
vote
0 answers

Deploying a Padrino app using capistrano (bundler: failed to load command: padrino)

I'm trying to deploy my Padrino application using Capistrano, but when I run the command: cap deploy the following output is generated: //... Other tasks executed properly * 2016-11-05 16:23:26 executing `assets:prepare' * executing "cd…
amp
  • 11,754
  • 18
  • 77
  • 133
1
vote
1 answer

Assign categories to a newly created post with Ruby and Padrino

I'm working on my ligthweight Padrino CMS which very much resembles the functionalities of Wordpress. When creating a new post I want to be able to assign them to many of the existing categories. Somehow I can not get my form work. My models look…
szabcsee
  • 373
  • 4
  • 12
1
vote
1 answer

Mongoid check intersecting time frames on document update

I want to check if the time frame intersects with another one on a document update. It works on creation, but I'm having trouble to change anything. This is what i have so far: if Timetracking.where(:begin.lt => params[:timetracking][:end], :end.gt…
1
vote
1 answer

Trapping constraint errors in Sequel ORM before the server

I have a Ruby/Padrino project using Sequel ORM to access a legacy database in MySQL. The problem I am having is that several of the tables have a user editable column that is also a Primary Key. I am trying to set up Sequel to catch any duplication…
CyberFerret
  • 275
  • 3
  • 8
1
vote
2 answers

Trouble with bundle exec padrino start

I am having difficulty performing a task which up until now has run without issue for the past year. To develop my Ruby Padrino application on my machine. I would use vagrant. Once vagrant is up I load the settings in putty and perform "bundle exec…
1
vote
0 answers

Image uploader for Padrino

I am new at Padrino. I created slider model and I want a image uploader as paperclip or other ones for padrino. Who can write or link me step-by-step tutorial for this?
Shaig Khaligli
  • 4,955
  • 5
  • 22
  • 32