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

Multiple databases are working in dev environment, but not test

This is a Padrino project. For some reason I am getting my second database loaded in the development environment, but not the test environment. This is probably very specific to my project, and it's unlikely anyone can help... but I'm really…
Jeremy Smith
  • 14,727
  • 19
  • 67
  • 114
1
vote
1 answer

Rspec tests pass when running individually but fails when running all together

The project uses MongoDB, so this answers weren't helpfull: 1, 2, 3 I can successfully execute every test file, or even small groups of test files, but they fail when running all together. rspec spec/* Finished in 23 minutes 45 seconds (files took…
1
vote
0 answers

Ignoring query parameters within Sinatra POST request

I have a Padrino/Sinatra project with a POST declaration for handling a critical task: post :deletewidget # widget ID is POSTed from page and is stored in params[:widgetid] Widget.get(params[:widgetid]).destroy! end Works fine when the data is…
Devan
  • 265
  • 2
  • 3
  • 7
1
vote
2 answers

Can't connect Padrino to PostgreSQL db w/ activerecord

Trying to setup the Padrino web framework to connect to my local PostgreSQL database with the following info: databases List of databases | Name | Owner |------------------------|------------ | postgres |…
thoughtpunch
  • 1,907
  • 4
  • 25
  • 41
1
vote
2 answers

What are my options if I have gems with conflicting dependencies?

I am trying to get a sample project up and running in Padrino using Mongoid. I was getting an error when running bundle because padrino required 3.0.8 of activesupport, and mongoid required 3.0.5. So I gem installed 3.0.5 and I was able to run…
Jeremy Smith
  • 14,727
  • 19
  • 67
  • 114
1
vote
1 answer

Where to put Padrino controller files in standalone Sinatra application?

I'm attempting to use Padrino's routing as a standalone addition to a basic Sinatra application. http://www.padrinorb.com/guides/standalone-usage-in-sinatra The main reason I need/want the additional Padrino functionality is the ability to separate…
Alex Mullans
  • 1,699
  • 2
  • 17
  • 34
1
vote
1 answer

Using DataMapper as Padrino session store

I was able to make Rack::Session::DataMapper, Padrino and Omniauth work together. The main goal was to have the same sessions and users in the main app and in the admin section, and to have very long lasting sessions. Option set :sessions was…
ujifgc
  • 2,215
  • 2
  • 19
  • 21
1
vote
0 answers

Mongoid error in Padrino when attempting to connect from Heroku to MongoHQ

I keep getting an Mongoid::Errors::InvalidDatabase - Database should be a Mongo::DB, not NilClass from a padrino app that I've got working on dev locally but which refuses to connect to MongoHQ. I've using padrino 0.9.23 and Mongoid 2.0.0. Stumped…
Daryl
  • 11
  • 2
1
vote
2 answers

Sinatra (rack.session) session auth

I have a Padrino application. And I would like to share the session between instances (load balanced machines). I set my own secret, but I don't know what else to set to let it work for session sharing. I see domain in cookie, where is hostname of…
Levi
  • 77
  • 7
1
vote
1 answer

Puma with Padrino, CPU consumption will not stop

I have one problem which I am trying to solve, I have Ruby web project, written in Padrino, it is quite simply project. But I have problems with running the Puma. Everything works fine, but after a few days, or if I make a stress test, the process…
Mlok
  • 155
  • 9
1
vote
2 answers

How to attach aptana debugger to a Padrino or Sinatra app

I'm using Aptana for a Padrino app, but I don't know how to attach the debugger once the server is running. I've installed the ruby-debug-ide gem and the Aptana Firefox extenstion. What's the correct debug configuration for setting that up? Also,…
ghostfly
  • 728
  • 5
  • 12
1
vote
1 answer

Padrino multilpe url for one route code

I would like to handle multiple URLs with one route code. I am trying something like this: get '/company', '/about' do ... end but it does not work. For /company, I get 200, but for /about, I get 404. Is there such way to do this?
Levi
  • 77
  • 7
1
vote
0 answers

Padrino and sequel nested attributes form

I am trying to make a form for storing data hierarchy through the associations. My structure of database is meta - ID (PK) version - meta_id (FK of meta) - ID (PK) - lang (FK from lang ...) - .... data - ID (FK of version) I need to store…
Levi
  • 77
  • 7
1
vote
1 answer

MismatchSenderId in push notification with Ruby

I am building a backend with Ruby (padrino framework) and would like to send push notification. I used this gem for push notification. https://github.com/spacialdb/fcm I used server key from firebase console could setting. This is code what I have…
Nomura Nori
  • 4,689
  • 8
  • 47
  • 85
1
vote
1 answer

sequel validation check whether name exists in same subcategory

I have an sequel model. I am trying to do validation. I have validation validates_unique :category which checks if the same name of category is not taken. It is okay, but I added subcategories (tree). So every record has parent_id if it is…
Mlok
  • 155
  • 9